2017-09-27 5 views
-1

Ich brauche Hilfe, ich habe ein Modul in Prestashop, für die Produkte. Jetzt zeigt es mir den Preis der Einheit und die Summe der gewählten Menge.Hinzufügen MwSt. Modul Prestashop

Ich muss auch den Gesamtpreis mit MwSt. Enthalten. Ich kann es nicht tun.

ich hinzufügen Code .tpl


(Gesamt)
   <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> 

I-Code hinzufügen .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); 

      } 

Antwort

0

Es tut mir leid, vielleicht auch ich drücke mich nicht, Was ich brauche, ist, dass ich abhängig vom Preis des Produkts die Mehrwertsteuer berechne.

Dies wird von Prestashop gebracht, aber ich verwende Prestashop nicht für Produktseite. Ich benutze ein Modul, das den Preis x Einheit und den Gesamtpreis ohne Mehrwertsteuer berechnet, was ich brauche ist, dass ich mit Mehrwertsteuer berechne.

Das habe ich von dem Modul in 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

Ich bin ein wenig verwirrt (fehlende Tag schließt nach 'var stringtotal = Preis' von der Art und Weise ...), aber ... Sie geben mir einen Link? Und wenn Sie den Preis auf der Seite einschließlich Mehrwertsteuer anzeigen möchten, sollten Sie die Modul-TPL-Datei anstelle der .js ändern. – Aurora