planetajuguetes Posted August 22, 2018 Share Posted August 22, 2018 Hi, I am currently using a connector from my TPV (POS) to prestashop 1.7.4.2 and then I use Amazon module by Common Services to import orders from Amazon and to update stock both ways. I use a cron than, in theory, updates changes in prestashop but i just realized it only "sees" the update if i save it manually. If the change is made by the POS connector (I mean done directly to the database) the cron does not work. How can I fix it? Link to comment Share on other sites More sharing options...
Rolige Posted August 22, 2018 Share Posted August 22, 2018 Hello, If it works by activating it manually and not through the cron, obviously you have a problem in the cron, if it's not the cron file then could be the cron task in your server. Regards! Link to comment Share on other sites More sharing options...
planetajuguetes Posted August 22, 2018 Author Share Posted August 22, 2018 Hi, cron works, that's not the issue. Thing is the cron only updates stock if the change stock has been saved through the browser. If the change has been made directly to the database then nothing is updated with the cron. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 22, 2018 Share Posted August 22, 2018 In that case, there might be some hook which is setting a flag in the DB, which is processing by CRON (This hook calling condition is failing while changing something directly into DB). Code analysis will be required to check what flag is being saved in the DB by the amazon module. Link to comment Share on other sites More sharing options...
planetajuguetes Posted August 22, 2018 Author Share Posted August 22, 2018 You are right: I have discovered this info. Module uses synchronization by hooks and my POS does not trigger the necessary Hook to its proper functioning Any idea how I can fix that? In Detail The Amazon module uses the technique of synchronization by Hooks described in a ticket on the Prestashop blog here:http://www.prestashop.com/blog/fr/la_synchronisation_via_les_hooks_ebay_par_fabien_serny/ And in the official Prestashop documentation here:http://doc.prestashop.com/display/PS14/Synchronization+via+Hooks (Note that the evoked version of Prestashop does not matter in this case, this operation affects all versions) By default, the module synchronizes your offers, that is, it sends the quantities and prices and only for items that have been modified. The operating principle is the same as that of eBay module, except that the Amazon module will only do the update a posteriori. Indeed, for each update of a product on eBay Module, it connects to eBay and transmits the information, the product or offer update, but it is not compatible with the operating mechanism of the Amazon marketplace, which requires sending batch updates. When updating an item, the Amazon module saves this update in a table, it is called “Logging”. Then, when you will request the module for an export, either by using the interactive menu “Catalog > Amazon” or by a scheduled task, the module lists all the log entries and sends the information to Amazon, the module sends a “feed”. While the module does not receive an “acknowledgment” from Amazon, it maintains information in the log. When it is received, the log entry is deleted. So you have the certainty that your data on Amazon will be constantly updated. Our clients sometimes use external software to update inventory/stock, POS management software etc. In this case the customer must ensure that the software is fully compatible with Prestashop and that it effectively triggers the necessary Hook to its proper functioning. If you are concerned, give a link of this page to your technical provider. 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