Добрый день.
Подскажите на opencart 3.0.2.0, что необходимо прописать в файле category.php. Чтобы при нажатии на кнопку купить в категории товара происходил переход по реф. ссылке.
Код кнопки в файле category.tpl
<button type="button" class="addtocart" onclick="location.href=('{{ product.location }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
в файле category.php, добавил строчку 'location' => $result['location'],
$data['products'][] = array(
'product_id' => $result['product_id'],
'thumb' => $image,
'thumb_swap' => $this->model_tool_image->resize($images, $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height')),
'name' => $result['name'],
'location' => $result['location'],
'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', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url),
'quick' => $this->url->link('product/quickview', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
);