When looking at the products in a category if you click on a product then the URL is wrong, it's put the product name into the URL.
https://www.gwenllian-retail.com/shop/i ... path=32_37
I can't remember which twig file I was editing.
-------------
Update:
I found the twig file.
/catalog/view/theme/default/template/product/category.twig:134
The problem is {{ product.href }} is returning the product name and not the href.
So where is {{ product.href }} being set?
---------------------
I'm guessing the values are being set in /catalog/controller/product/category.php but it looks fine.
Am I right?
This is lines 196-206
Code: Select all
$data['products'][] = array(
'product_id' => $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', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
);