增值税模块prestashop

问题描述:

我需要帮助,我有一个模块prestashop,为产品。 现在它显示了单位的价格和所选数量的总和。增值税模块prestashop

我还需要显示包含增值税的总价。我做不到。

我添加代码.tpl


(总)
   <div class="preu_total_IVA"> <span class="text_preu_IVA">IVA incluido:</span> <span id="mp_total_price_IVA"></span> <span style="font-weight:normal;">€</span></div> 

我添加代码.tpl

{ 

      var price = jsonData['price']; 
      var unitprice = jsonData['unitprice']; 
      var preutotaliva = jsonData['preutotaliva']; 
      //var stringtotal = unitprice + '<br/><span class="mp_our_price">(Total '+price+')</span>'; 
      var stringtotal = price; 
      $('#our_price_display').html(stringtotal); 
      if($('.mp_total_price').length) 
       $('.mp_total_price').html(price); 
      if($('.mp_unit_price').length){ 
       $('.mp_unit_price').html(unitprice); 
       if($('.mp_total_price_IVA').length) 
      $('.mp_total_price_IVA').html(preutotaliva); 

      } 

对不起,也许我不解释自己很好,我需要的是根据产品的价格计算增值税。

这是由prestashop带来的,但我不使用prestashop产品页面。 我使用一个模块计算价格x单位和总价格不含增值税,我需要的是我用增值税计算。

这是我在javascript中的模块。

var price = jsonData['price']; 
 
\t \t \t \t var unitprice = jsonData['unitprice']; 
 
\t \t \t \t //var stringtotal = unitprice + '<br/><span class="mp_our_price">(Total '+price+')</span>'; 
 
\t \t \t \t var stringtotal = price 
 
\t \t \t \t $('#our_price_display').html(stringtotal); 
 
\t \t \t \t if($('.mp_total_price').length) 
 
\t \t \t \t \t $('.mp_total_price').html(price); 
 
\t \t \t \t if($('.mp_unit_price').length){ \t 
 
\t \t \t \t \t $('.mp_unit_price').html(unitprice); 
 
\t \t \t \t }

+0

我有点糊涂(失踪的方式后,“无功stringtotal =价格”关闭标签...)但是...你能为我提供一个链接?如果你想在包含增值税的页面中显示价格,我认为你应该改变模块tpl文件而不是.js。 – Aurora