【发布时间】:2017-11-08 13:45:03
【问题描述】:
我正在使用 opencart 2.3.0.2。我想直接在产品页面上显示结帐表格。 Journal2中安装的主题。我该怎么做?
【问题讨论】:
我正在使用 opencart 2.3.0.2。我想直接在产品页面上显示结帐表格。 Journal2中安装的主题。我该怎么做?
【问题讨论】:
编辑文件:catalog/view/theme/yourtheme/template/product/product.tpl 并进行以下修改:
查找代码:
if (json['success']) {
$('.breadcrumb').after('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>');
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
$('html, body').animate({ scrollTop: 0 }, 'slow');
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
替换为以下代码:
if (json['success']) {
window.location='index.php?route=checkout/checkout';
}
然后从管理员刷新修改缓存。
转到 admin > Extensions > Modifications 并单击蓝色的刷新按钮(右上角)以更新系统。然后检查它。(如果您的主题中有任何其他可用的缓存选项。此外,它会缓存刷新。)
【讨论】: