Solved

Where is the Product weight stored on Magento 1.3.0 MySQL Database

Posted on 2009-06-29
3
2,620 Views
Last Modified: 2013-11-18
Hi All,

I want to perform an SQL update on all products weight values within my Magento database but so far, I haven't been able to locate the table that contains the product weight.

Does anyone know where I will find it?

Many thanks,

Rit
0
Comment
Question by:rito1
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
fibo earned 500 total points
ID: 24740428
You'll find it nowhere.
The data model is not the usual relational tables/fields linked thru relations.
It is the EAV model, in which almost each piece of information is a record (I did not say "a field in a record").

So forget the idea to deal with a complete column in a table.
(Well, if you really want, you can make it... but it will be really painful).

But of course you need a solution to your problem.
a - general comment: creating a collection of products, you might use some php logic to work thru your column. BUT I would not recommend that approach here
b - the easiest solution, that can be pretty well almost automated, is to use csv and a "data hub": for each of the product you need, export its sku and weight. this gives you a csv file that you can work on with your preferred spreadsheet, changing weight etc. then you import the csv file

Just a friendly reminder: until you have checked that your import process is fine, you should be very cautious at these results
- backup your DB, both from within Magento/Admin, AND with phpMyAdmin (do not select the "extended insert" option)
- test your import on a small number of records, maybe test records
- when importing csv, be sure to change the "bucket size" of how many records are imported at a time from its (stupid) default value of 1 to 10 or 30
- when importing, disable the "flat catalog" options
0
 
LVL 1

Author Closing Comment

by:rito1
ID: 31598116
Thank very much.
0
 
LVL 29

Expert Comment

by:fibo
ID: 24743673
B-) Thx for the grade and points.
Sorry I was delivering bad news!

BTW, there are some tables which are not EAV and could be used for some direct SQL, like  the one which handles the list values... but you will probably prefer to stay with EAV once you have started building your php functions and shortcuts.
A strong point with EAV is that it updates fine, ie if you "add a column" you are in fact just adding the attribute and some values (one record per value)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The aim of this article is to help you solve the error "Cannot insert the value NULL into column 'ShortDescription', table 'albert_store.dbo.Nop_Product'; column does not allow nulls. UPDATE fails." problem and allow you to continue updating your No…
Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now