Saturday, April 30, 2011

PrestaShip Tips - PrestaShop 1.4 wrong price displaying issuse with imported products and fixes

If you use PrestaShop and use Import function to import catalog data(categories, products), you may face some issues. Those issue seems happens at 1.4.0.17/1.4.1.0.

What is the problem
===================
After upload products data from CSV file. You will find following potential issue.
1. Product price displayed at front office it not correct
2. Stock information at front office may incorrect. Product will show as out of stock even it is not.

The above issues only happens if your products do not have attributes or options.

The cause of problem
====================
The upload program in PrestaShop 1.4.0/1.4.1 has a small bug. It does not set cache_default_attribute correctly.

How to fix
==================
Run following two SQL statement at your PrestaShop database, it will fix above problem. You can use database admin tool such as PhpMyAdmin

1. Set cache_default_attribute field to 0 for all products
UPDATE `ps_product` SET `cache_default_attribute` = 0;

2. Reset the values
UPDATE `ps_product` AS p, `ps_product_attribute` AS pa SET p.`cache_default_attribute` = pa.`id_product_attribute`
WHERE p.`id_product` = pa.`id_product` AND pa.`default_on` = 1

Please replace "ps_" to the table prefix of your PrestaShop if it is different from default "ps_".


Looking for some modules to empower your prestaShop?
Please check http://addons-modules.com/for following popular and wonderful modules.
Free PrestaShop addon and modules are also available at the same site.

Agile Paypal-PrestaShop Paypal Express checkout module,No SSL, No customer Registration, help reduce error and customer sropout rate.
Agile Membership- membership fee/expiration/discounts management
Agile Pickup center- shipping module for local pickup location management
Agile multiple seller - enable customer seller accounts to sell/manage products

3 comments:

shoparisienne admin said...

thaks for sharing, Alvin! It'll be very helpful for me (as I will upgrade my store in 1.4.1).')

Phone said...

thank you for sharing.

Robin said...

Thnx, helped me out alot
Was pulling my hair out as where the weird behaviour came from