Magento 税收开关
Magento tax toggle
一段时间以来,我一直在寻找这方面的建议。有没有办法在 Magento 中切换税收显示(inc Tax,ex Tax)。我的客户想要两个单选按钮,一个显示税收,一个不显示。
有几个插件,但似乎没有经过 1.7 版以上的测试
Magento 默认将价格包装在 <span>
元素中 class "price-excluding-tax"
或 "price-including-tax"
。您可以只使用 javascript 来显示或隐藏它们。例如,如果您使用 jQuery
:
if(exTax radio button is clicked){
jQuery('.price-including-tax').hide();
jQuery('.price-excluding-tax').show();
}else{
jQuery('.price-including-tax').show();
jQuery('.price-excluding-tax').hide();
}
还要确保 Magento 配置为在前端显示含税和不含税的价格。
一段时间以来,我一直在寻找这方面的建议。有没有办法在 Magento 中切换税收显示(inc Tax,ex Tax)。我的客户想要两个单选按钮,一个显示税收,一个不显示。
有几个插件,但似乎没有经过 1.7 版以上的测试
Magento 默认将价格包装在 <span>
元素中 class "price-excluding-tax"
或 "price-including-tax"
。您可以只使用 javascript 来显示或隐藏它们。例如,如果您使用 jQuery
:
if(exTax radio button is clicked){
jQuery('.price-including-tax').hide();
jQuery('.price-excluding-tax').show();
}else{
jQuery('.price-including-tax').show();
jQuery('.price-excluding-tax').hide();
}
还要确保 Magento 配置为在前端显示含税和不含税的价格。