Aktionen
GX-Bug #66469
geschlossenInactive product causes exception in the shopping cart
% erledigt:
0%
Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
4.1.1.0 beta3
Release Notes Langtext:
Inaktive Produkte im Einkaufswagen werfen keine Fehlermeldungen mehr
Beschreibung
Steps to reproduce:
- Add a product to the cart
- Open a new tab and log in to the Gambio Admin
- Navigate to Catalog > Categories / Products
- Select the product, that has been added to the cart back in the first step
- Deactivate that product
- Go back to the store frontend
- Go to the cart
Result:
Opening the cart ends up with the following error:
Uncaught TypeError: Return value of product_ORIGIN::getProductsName() must be of the type string, null returned in …/includes/classes/product.php:1210 Stack trace: #0 …/GambioShop/Product/Name/Listener/OnGetProductInfoEventListener.php(32): product_ORIGIN->getProductsName() #1 …/GambioCore/Event/EventDispatcher.php(78): Gambio\Shop\Product\Name\Listener\OnGetProductInfoEventListener->__invoke(Object(Gambio\Shop\SellingUnit\Database\Unit\Events\OnGetProductInfoEvent)) #2 …/GambioShop/SellingUnit/Unit/SellingUnit.php(295): Gambio\Core\Event\EventDispatcher->dispatch(Object(Gambio\Shop\SellingUnit\Database\Unit\Events\OnGetProductInfoEvent)) #3 …/GXMainComponents/View/ThemeContentViews/shopping_cart/OrderDetailsCartThemeContentView.inc.php(182): Gambio\Shop\SellingUnit\Unit\SellingUnit->productInfo()
Solution:
Check for product existence before trying to get the product details
Zugehörige Tickets
Aktionen