PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.1k stars 4.79k forks source link

Error in Shopping Carts list with Multistore enabled when selecting "All shops" context #36894

Open Codencode opened 2 weeks ago

Codencode commented 2 weeks ago

Prerequisites

Describe the bug and add attachments

When Multistore is enabled and there are at least two active shops, an error occurs in the back-office when viewing the Shopping Carts list with the "All shops" context selected.

The issue arises when a product is associated exclusively with Shop 2, and a shopping cart is created in Shop 2 with this product. When switching the context in Orders > Shopping Carts to All shops, an error appears instead of the expected shopping cart list.

screen-capture.webm

Expected behavior

No response

Steps to reproduce

  1. Activate Multistore in Prestashop.
  2. Create at least 2 shops (Shop 1, Shop 2).
  3. Associate a product exclusively with Shop 2.
  4. Create a cart in Shop 2 with the product from Shop 2.
  5. Enable Debug Mode in the Prestashop back-office (Advanced Parameters > Performance).
  6. In the back office, go to Orders > Shopping Carts.
  7. Set the context to All shops.
  8. Observe the error.

PrestaShop version(s) where the bug happened

8.1.7

PHP version(s) where the bug happened

No response

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

@codencode

florine2623 commented 1 week ago

Hello @Codencode ,

I have reproduced your issue :

Screenshot 2024-09-18 at 16 09 36

Thanks for your PR, it will be tested shortly ^^