Jump to content

Diffrence on columns in tables stock_available & product_attribute


redrum
 Share

Recommended Posts

I'm doing a migration from osCommerce to PrestaShop

I noticed that both tables 'ps_stock_available' and 'ps_product_attribute' contain the columns 'quantity' and 'location'.
As far as I can see its the data in the table 'ps_stock_available' PrestaShop is looks in when we want to get information about quantity and location.

So, whats the reason 'quantity' and 'location' exists in two different tables?
Does the one table do something that the other doesn't, or are the mentioned columns in table 'ps_product_attribute' redundant?

Cheers!

Share this post


Link to post
Share on other sites

53 minutes ago, redrum said:

As far as I can see its the data in the table 'ps_stock_available' PrestaShop is looks in when we want to get information about quantity and location.

I noticed that checking for the quantity of a product (with attribute), PrestaShop checks the table 'ps_product_attribute'.
And when checking for a product stock location, PrestaShop looks in the table 'ps_stock_available'.

Never the less, my questions still remains.

Edited by redrum
Sorry, that was a misstake (see edit history)

Share this post


Link to post
Share on other sites

Prestashop is very conservative when it comes to deleting fields that are no longer used. There is also for example a big overlap between ps_product and ps_product_shop. As far as I know the main reason is fear that some modules might no longer work if they delete a field.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More