Projekt

Allgemein

Profil

Aktionen

GX-Bug #66469

geschlossen

Inactive product causes exception in the shopping cart

Von Marco Bruchmann vor etwa 4 Jahren hinzugefügt. Vor etwa 4 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Hoch
Zugewiesen an:
Jonatas Fischer
Kategorie:
Core
Zielversion:
% 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:

  1. Add a product to the cart
  2. Open a new tab and log in to the Gambio Admin
  3. Navigate to Catalog > Categories / Products
  4. Select the product, that has been added to the cart back in the first step
  5. Deactivate that product
  6. Go back to the store frontend
  7. 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

Beziehung mit GX-Entwicklung - GX-Feature #67300: Deactivated articles should not be removed from the shopping cart and wishlistErledigtMoritz Bunjes

Aktionen
Aktionen

Auch abrufbar als: Atom PDF