RaPhiuS Posted July 23, 2013 Share Posted July 23, 2013 Hello guys, I have a Prestashop 1.5.4.1 freshly installed yesterday and I was doing some regression on a module I am developping since quite a while. For some operations of my module, I am updating the active column of that product in the database (table ps_product) and then call the traditional update() method to get this change commited in the database. What was a damn bad surprise here where I noticed that changing this column only (active column) resulted in the price to change every time I change it (it litterally add money always to the previous price, so the price keeps going up). This is a terrible terrible situation. The code is below: if (!$productToEnable->active) { // Update the product database entry $productToEnable->active = true; if (!$productToEnable->update()) return false; unset($productToEnable); As you can see nothing fancy here, I update the active column, call update() and baaaaammm, the price changes. I suspect there is a cascade of methods call in the update() which creates this not to mention horrible and messy behavior. Did someone already get this? I am very worry of the stability of Prestashop when I see this. Is there anything convincing which you guys could tell me about the stability of the 1.5.4+ release? Appreciate your input! BR, RaPhiuS Link to comment Share on other sites More sharing options...
RaPhiuS Posted July 23, 2013 Author Share Posted July 23, 2013 Looks like the tax subsystem is messing around.... ohh my gosh! How is that possible ?!?!?!?!?! Link to comment Share on other sites More sharing options...
RaPhiuS Posted July 23, 2013 Author Share Posted July 23, 2013 Any ideas? Link to comment Share on other sites More sharing options...
RaPhiuS Posted July 24, 2013 Author Share Posted July 24, 2013 Really, nobody ever got this situation? Please comment :-/ Link to comment Share on other sites More sharing options...
RaPhiuS Posted July 24, 2013 Author Share Posted July 24, 2013 Come on, nobody noticed this stuff? I would qualify this as a rather serious problem from PrestaShop core classes, especially when we speak about products.... Any comments welcome! Link to comment Share on other sites More sharing options...
Recommended Posts