Search code examples
opencarthrefproduct

Opencart product path "$product['href']" doesnt work


In my opencart project my $product['href'] is "index.php?route=product/product&path=60&product_id=81" when i get to the page it only shows array() on the page.

if i then remove "&path=60" It shows the product..


Solution

  • you can edit link generation in product controller in path

    /catalog/controller/product/product.php

    search for

    `'href' => $this->url->link

    in default should be: 'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']),

    if it doesn't same as default so edit it.