如何链接到具有与我的网站相同的产品页面ID的外部OpenCart产品页面?

I would like to add an external link to the OpenCart product page - it can be anywhere on the page. I just want to link it to the same product page on an external site that has different options.

I tried to define it in the product controller file at breadcumbs but I don't have idea how can I change the default http value via PHP str_replace or something similar.

'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),
'href2' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),

I also tried to place this after the breadcrumb in product.tpl like <a href="<?php echo $breadcrumb['href2']; ?>"

So this is working slightly - I just need to do the PHP replace or something better on the product page to point to the external domain.

Rather than modifying the core PHP. You can do this easily inside your product.tpl file instead.

1 - Open /catalog/view/theme/default/product.tpl

2 - Add your link

<a href="http://example.com/index.php?route=product/product&product_id=<?php echo $this->request->get["product_id"]; ?>">Your Link</a>

What I am doing here is using $_GET to fetch your ProductID from the HEADER and that saves modifying the controllers.