在结帐页面上的新选项卡中打开"Terms & Conditions"链接



"条款和条件"链接在Opencart 2.3.0.2结帐页面上的弹出窗口中显示整个页面。我希望在新选项卡中打开它。我尝试过,但未能实现。我是乌斯特波尔图主题。任何帮助将不胜感激。

我假设您使用的是默认模板和英语,否则说明可能会有所不同,但这应该可以让您入门。

catalog/view/theme/default/template/checkout/payment_method.tpl 中,您将看到如下所示的文本块:

<div class="pull-right"><?php echo $text_agree; ?>

这是打印链接的内容。 此变量$text_agreecatalog/controller/checkout/payment_method.php 中设置。 这是执行此操作的逻辑:

$data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->link('information/information/agree', 'information_id=' . $this->config->get('config_checkout_id'), true), $information_info['title'], $information_info['title']);

您想将其更改为

$data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->link('information/information', 'information_id=5' , true), $information_info['title'], $information_info['title']);

最后你有链接的定义。 在catalog/language/en-gb/checkout/checkout.php变化中

$_['text_agree'] = 'I have read and agree to the <a href="%s" class="agree"><b>%s</b></a>';

$_['text_agree'] = 'I have read and agree to the <a href="%s" target="_blank"><b>%s</b></a>';

最新更新