jennywill Posted October 3, 2015 Share Posted October 3, 2015 (edited) In the process of upgrading to 1.6.1 and encountered a major roadblock. We have a standalone [inhouse written] script that pulls pricing and inventory from 4 different suppliers and updates the price and quantity directly to the database. However, the changes to price and quantity are only updating if you do it directly in the back office. If you make the changes directly to the DB tables they are not changing on the front end. This script has worked fine on versions prior to 1.6 as we have several [separate] ecom businesses running different versions of prestashop. This upgrade is the first one to use 1.6. I have clears every cache I know to clear including manually deleting the files. I am updating price & quantity in the new tables as well keeping them synced [prefix]_product (wholesale price, retail price & quantity), [prefix]_product_shop (wholesale price & retail price), [prefix]_stock_available (quantity), & [prefix]_product_supplier (wholesale price). I am missing something somewhere, and it seems like the price and quantity are being cached somewhere. Any thoughts on how to clear this cache or access it to make the change? The whole project is at a standstill if we can not keep our pricing and inventory in sync with our suppliers. THX!! Edited October 3, 2015 by jennywill (see edit history) Link to comment Share on other sites More sharing options...
gasworks Posted October 3, 2015 Share Posted October 3, 2015 (edited) Sorry, missed some detail in your post that invalidates my answer Edited October 3, 2015 by gasworks (see edit history) Link to comment Share on other sites More sharing options...
jennywill Posted October 4, 2015 Author Share Posted October 4, 2015 (edited) Update - so after further digging it appears that this is a caching issue where price and quantity are being cached. In StockAvailable.php I see Cache::store($key, $result); and return Cache::retrieve($key); in function getQuantityAvailableByProduct I understand the idea of caching, but it does seem silly to cache only the price and quantity while the other fields of a product page/listing are still read in directly from the db on demand. So it seems what I need to solve this is a systematic way to clear the cache after the direct updates are made, or our standalone script needs to be integrated to access the Cache keys.....either way is Yuk. Additional Updated Solution: So we changed the bottom-most caching option to use APC for the moment, and direct changes to the DB are now being reflected. This is a relief so long as our production load testing passes and we can keep improving on the page load times. Can mark as solved! Edited October 4, 2015 by jennywill (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now