Jump to content

Получение атрибутов в search


vortex
 Share

Go to solution Solved by vortex,

Recommended Posts

Добрый день. 

 

Пытаюсь получить атрибуты товаров в search

В контроллер catalog/controller/product/search.php

Вставляю строчку: 'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']),

Получаю ошибку: Notice: Undefined property: Proxy::getProductAttributes in on line

Opencart 3

				$data['products'][] = array(
					'product_id'  => $result['product_id'],
					'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']),
					'thumb'       => $image,
					'name'        => $result['name'],
					'description' => utf8_substr(trim(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',
					'price'       => $price,
					'special'     => $special,
					'tax'         => $tax,
					'minimum'     => $result['minimum'] > 0 ? $result['minimum'] : 1,
					'rating'      => $result['rating'],
					'href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'] . $url)
				);

 

Link to comment
Share on other sites

  • Solution

разобрался, в шаблоне UniShop модификатор замену делал. 

 

		<operation error="skip">
			<search><![CDATA[model_catalog_product]]></search>
			<add position="replace"><![CDATA[{isset($uniset['search']['status']) ? 'model_extension_module_uni_search' : 'model_catalog_product'}]]></add>
		</operation>

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...