Opencart 产品路径“$product['href']”不起作用

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

在我的 opencart 项目中,我的 $product['href'] 是 "index.php?route=product/product&path=60&product_id=81" 当我到达页面时,它只在页面上显示 array()。

如果我然后删除“&path=60”,它会显示产品..

您可以在路径

的产品控制器中编辑 link 生成

/catalog/controller/product/product.php

搜索

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

默认应该是: 'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']),

如果它与默认值不同,请对其进行编辑。