*/
public function getProductOptionsHtml ($product)
{
$html = "";
$product_options = [];
if ( $product->getOptions() )
$product_options = $product->getOptions()->getBrickGetters();
if ( count($product_options) )
{
foreach ($product_options as $optionGetter)
'cart' => $_cart,
'userCartItems' => $shopHelper ->countCartItems( $_cart ),
'cartHasDigitals' => $shopHelper ->cartDigitalProducts( $_cart ),
'cartItemsTypes' => $shopHelper ->getCartItemsTypes( $_cart ),
'product' => $product,
'productOptions' => $_shop ->getProductOptionsHtml( $product ),
'shopMenu' => $shopHelper ->getCategoriesMenu( $shop->getShop_category_root(), WEBSITE_SHOP_FRONTEND_CATEGORIES_PATH, $cId, $_locale ),
'shopBreadcrumbs' => $shopHelper ->getCategoriesBreadcrumbs ( $shop, $_locale ),
'manufacturersList' => $brands,
'metaTitle' => ( WEBSITE_SHOP_FRONTEND_NAME . ' | ' . $product->getName() ),
'metaDescription' => trim( $product->getMeta_description() )
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$kernel = \Pimcore\Bootstrap::kernel();
// reset current request - will be read from request stack from now on
Tool::setCurrentRequest(null);
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
Error
|
---|
Error: Call to a member function getOptions() on null at src/Shop/Shop.php:585 at App\Shop\Shop->getProductOptionsHtml() (src/Controller/ShopController.php:300) at App\Controller\ShopController->productAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:36) |