harald.thomas Posted Saturday at 11:46 AM Share Posted Saturday at 11:46 AM Hi All, If a customer puts an article in his shopping basket and deletes it with the X beside the article in the basket, the article is deleted completely, even from the article list in the backend. The issue is reproducible. PS version 8.2.3 PHP version 8.1.33 Any suggestion on how to solve this? slainte Harald Link to comment Share on other sites More sharing options...
Nickz Posted Saturday at 12:35 PM Share Posted Saturday at 12:35 PM That is hefty, change to another Shopsystem, downgrade, upgrade are your options. Link to comment Share on other sites More sharing options...
Daresh Posted Saturday at 02:16 PM Share Posted Saturday at 02:16 PM Deleted completely? With what X? Maybe you have some custom made functionality not implemented correctly. Link to comment Share on other sites More sharing options...
harald.thomas Posted Saturday at 02:29 PM Author Share Posted Saturday at 02:29 PM (edited) yes, completely, the theme is a custom theme, but not affecting the behaviour, used the default theme with same issue. here is a video https://wetransfer.com/downloads/933829aefca48bd4afed0f5e5affc0f920251004142713/16c7d6e8979e9283bd90b1ef36ca9f3520251004142733/4e8988?trk=TRN_TDL_01&utm_campaign=TRN_TDL_01&utm_medium=email&utm_source=sendgrid DeletedArticle.mp4 Edited Saturday at 02:30 PM by harald.thomas (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted Saturday at 02:30 PM Share Posted Saturday at 02:30 PM Usual suspect: a module hooked on cart-delete Go to: Design → Positions (in older builds, “Improve → Design → Positions”). Search the hook also select: Display non-positionable hooks In the search bar at the top-right of that page, type one of: actionObjectProductInCartDeleteAfter or (for legacy modules) actionDeleteProductInCartAfter If a module is registered on that hook, it will appear in the results table. Sometimes the problem module is using an older or slightly different hook name: actionObjectCartDeleteAfter actionCartSave actionObjectCartRemoveProductAfter actionCartUpdateQuantityBefore Link to comment Share on other sites More sharing options...
harald.thomas Posted Saturday at 02:34 PM Author Share Posted Saturday at 02:34 PM only one module registered: Link to comment Share on other sites More sharing options...
El Patron Posted Saturday at 02:44 PM Share Posted Saturday at 02:44 PM 8 minutes ago, harald.thomas said: only one module registered: this looks legitimate. Did you check other hooks? Also enable debug mode and replicate issue and make sure to check error log in hosting. Link to comment Share on other sites More sharing options...
Daresh Posted Saturday at 02:46 PM Share Posted Saturday at 02:46 PM Is the shop live so we can see it? What is the cart module that you are using? It looks quite custom, probably instead of deleting product from the cart it deletes the product totally. Link to comment Share on other sites More sharing options...
harald.thomas Posted Saturday at 02:48 PM Author Share Posted Saturday at 02:48 PM where can I set the debug mode? will it record every call? Link to comment Share on other sites More sharing options...
harald.thomas Posted Saturday at 02:55 PM Author Share Posted Saturday at 02:55 PM 7 minutes ago, Daresh said: Is the shop live so we can see it? What is the cart module that you are using? It looks quite custom, probably instead of deleting product from the cart it deletes the product totally. I will send you a link as PM. the default theme does the same, no shopping cart plugins Link to comment Share on other sites More sharing options...
harald.thomas Posted Saturday at 03:11 PM Author Share Posted Saturday at 03:11 PM This is the Link for the remove from car icon (X): <a class="remove-from-cart" rel="nofollow" href="https://xxxxxxx/warenkorb?delete=1&id_product=249&id_product_attribute=0&token=xxxxxxxxxx" data-link-action="delete-from-cart" data-id-product="249" data-id-product-attribute="0" data-id-customization=""><i class="material-icons"></i></a> Link to comment Share on other sites More sharing options...
Daresh Posted Saturday at 03:25 PM Share Posted Saturday at 03:25 PM Weird indeed. Like @El Patron wrote, it may be something hooked to 'actionObjectProductInCartDeleteAfter', but the only module that is there is PrestaShop Checkout. Are you using it? If not, disable or uninstall. Link to comment Share on other sites More sharing options...
El Patron Posted Saturday at 03:58 PM Share Posted Saturday at 03:58 PM 36 minutes ago, harald.thomas said: This is the Link for the remove from car icon (X): <a class="remove-from-cart" rel="nofollow" href="https://xxxxxxx/warenkorb?delete=1&id_product=249&id_product_attribute=0&token=xxxxxxxxxx" data-link-action="delete-from-cart" data-id-product="249" data-id-product-attribute="0" data-id-customization=""><i class="material-icons"></i></a> this is normal 23 minutes ago, Daresh said: Weird indeed. Like @El Patron wrote, it may be something hooked to 'actionObjectProductInCartDeleteAfter', but the only module that is there is PrestaShop Checkout. Are you using it? If not, disable or uninstall. I did check that prestashop checkout does is hooked here normally, at least on a 9.0.0. to narrow down try the following: Disable all overrides (Advanced Parameters → Performance) and re-test. If the deletion stops, inspect override/classes/Cart.php, override/classes/Product.php, or any controller override. In Back Office go to Advanced Parameters → Performance. Under Debug mode, switch Enable Debug Mode to Yes and Save. Reproduce and collect the profiler data at the bottom of the footer of our website. This will provide a lot of insights you may not have already collected. Link to comment Share on other sites More sharing options...
harald.thomas Posted Saturday at 04:11 PM Author Share Posted Saturday at 04:11 PM Disable all overrides -> still the same issue I disabled the hook actionObjectProductInCartDeleteAfter - still same issue will do the debug tomorrow. where can i check the debug log? Link to comment Share on other sites More sharing options...
El Patron Posted Saturday at 04:35 PM Share Posted Saturday at 04:35 PM 17 minutes ago, harald.thomas said: Disable all overrides -> still the same issue I disabled the hook actionObjectProductInCartDeleteAfter - still same issue will do the debug tomorrow. where can i check the debug log? If your hosting has Plesk, cPanel, or similar: → Look for Logs → PHP Error Log (sometimes called “Web Server Logs”). You can also check whether your installation has been modified unexpectedly. Go to Advanced Parameters → Performance. Scroll down and find the “Check Files” section (sometimes labeled “Check PrestaShop files integrity” or “Check if files have been modified”). PrestaShop will compare your core files against its original checksums. If files have changed in /controllers/, /classes/, or /modules/ and you didn’t modify them yourself, that’s a red flag. While this specific “delete product from catalog when removing from cart” behavior is unusual, it’s worth noting: Many PrestaShop stores have been hacked through outdated modules or themes, often exploiting insecure file uploaders or helper classes. This can allow attackers to: Inject malicious code into overrides, Replace controller files, or Hook scripts into events like cart updates (exactly what’s happening here). So if: You see unexpected file changes in Advanced Parameters → Performance, Or your PHP logs show suspicious includes or eval(), then treat this as a security incident — not just a bug. Me? if you want to stay with PrestaShop then use a tool like migrator pro and migrate to fresh copy of PrestaShop. I see that you have many topics on this same question. Or move your catalog to different ecommerce platform so you can get focus on selling rather then debugging Link to comment Share on other sites More sharing options...
harald.thomas Posted 19 hours ago Author Share Posted 19 hours ago Thanks for the hints. No altered files found. The only log that I could find was: A.B.C.D - - [05/Oct/2025:11:13:25 +0200] "POST /warenkorb?delete=1&id_product=253&id_product_attribute=0&token=c473c28e64c98d4c690b6b56647c4adc HTTP/1.0" 200 4070 "https://xxxxxx/suche?controller=search&s=test" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15" A.B.C.D - - [05/Oct/2025:11:13:26 +0200] "POST /module/ps_shoppingcart/ajax HTTP/1.0" 200 6050 "https://xxxxxx/suche?controller=search&s=test" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15" Thanks for the hint with migrator pro, already used it to migrate to this version of the shop. any other hint for tracking this down? Link to comment Share on other sites More sharing options...
El Patron Posted 16 hours ago Share Posted 16 hours ago 2 hours ago, harald.thomas said: Thanks for the hints. No altered files found. The only log that I could find was: A.B.C.D - - [05/Oct/2025:11:13:25 +0200] "POST /warenkorb?delete=1&id_product=253&id_product_attribute=0&token=c473c28e64c98d4c690b6b56647c4adc HTTP/1.0" 200 4070 "https://xxxxxx/suche?controller=search&s=test" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15" A.B.C.D - - [05/Oct/2025:11:13:26 +0200] "POST /module/ps_shoppingcart/ajax HTTP/1.0" 200 6050 "https://xxxxxx/suche?controller=search&s=test" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15" Thanks for the hint with migrator pro, already used it to migrate to this version of the shop. any other hint for tracking this down? those https above are ok. I suppose really only way now to pin point it is to disable 3rd party modules from performance page, first make a list of enabled modules. Cheek if problem still exists and if not then enable one by one until problem comes back. This will tell you which module if any is creating the issue. Also advanced --> information did you check which ps files changed? 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