Solved

Where is the Product weight stored on Magento 1.3.0 MySQL Database

Posted on 2009-06-29
3
2,640 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Mod_Rewrite, htaccess, opencart 4 87
payment system 2 32
Open Source: Multi-Level-Marketing software? 3 133
In BackOffice orders appears Bank Transfer instead Paypal 1 42
Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

895 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

11 Experts available now in Live!

Get 1:1 Help Now