[英]Prestashop how to make modification on Add and Minus button in shopping cart
who knows what file controls the function for add and minus button in the shopping cart? 谁知道哪个文件控制着购物车中添加和减号按钮的功能? I want to change the qty that is added or minus after any buttons is clicked.
我想更改单击任何按钮后添加或减去的数量。
this is the code for the ADD button 这是添加按钮的代码
<a rel="nofollow" class="" id="" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$token_cart}")|escape:'html':'UTF-8'}" title="{l s='Add' mod='advancedcheckout'}"><span><i class="fa fa-plus"></i></span></a>
Changing add=1
is not making any changes. 更改
add=1
不会进行任何更改。 So At start I thought it was a JS or AJAX file, but the button continues working even after I deleted all classes and ID. 因此,一开始我以为它是JS或AJAX文件,但是即使删除了所有类和ID,按钮仍然可以正常工作。 So I think all this trick is made by the code in
href=""
因此,我认为所有这些技巧都是由
href=""
的代码完成的
But where I can make the changes for the qty added? 但是在哪里可以对添加的数量进行更改? Who knows?
谁知道?
If I good understand. 如果我很好理解。 You should look at those file:
您应该查看这些文件:
themes/defaylt-theme/js/product.js: line 424
themes/defaylt-theme/js/product.js: line 408
You have to check the 您必须检查
cart-summary.js
cart-summary.js
in your theme/js/ folder. 在您的theme / js /文件夹中。 This will contain the + and the - button events
这将包含+和-按钮事件
function upQuantity
功能提升
function downQuantity
功能下降
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.