Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Grigore

Newbie
  
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Grigore

  1. Добрый вечер. Как можно заполучить массив товаров добавленные в сравнении в Open Cart 3 ? Нужно все это вывести на странице категории. Я пока что делал хотя бы так что бы понять как работает контроллер. К примеру что бы вывести товары добавленные в Wishlist на странице категории я добавил в контроллер: $data['productsw'] = array(); $resultsw = $this->model_account_wishlist->getWishlist(); foreach ($resultsw as $resultw) { $product_infow = $this->model_catalog_product->getProduct($resultw['product_id']); if ($product_infow) { $data['productsw'][] = array( 'product_id' => $product_infow['product_id'], 'name' => $product_infow['name'] ); } else { $this->model_account_wishlist->deleteWishlist($resultw['product_id']); } } далее я хочу посмотреть все что передается через twig: {{ dump(productsw)}} но на странице выводится только NULL. Как можно создать кастомные массивы в контролере ?
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.