Jump to content
dbmaulana

Menunjukkan Harga Awal pada Produk yang Memiliki Diskon pada Invoice Prestashop 1.6

Recommended Posts

Mari kita lihat invoice default dari prestashop 1.6 adalah seperti gambar dibawah ini :

 
Harga "Unit Price" yang tertera pada bagian tersebut harusnya SGD$35.00, namun entah mengapa pada presatshop value yang di munculkan adalah harga product setelah di discount, sehingga jika sepintas kita melihat invoice di atas, itu akan terlihat sedikit aneh. ^_^
 
Oke untuk merubah/memperbaiki bugs tersebut mari ikut langkah berikut :
  • Buka file invoice.tpl pada folder pdf
  • Coba perhatikan baris 152-156, atau kurang lebih scriptnya sebagai berikut :
 {if $tax_excluded_display}
      {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl}
 {else}
      {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl}
  {/if}
  • Ganti script tersebut dengan script berikut :
{if $tax_excluded_display && (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)}
                        {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl*100/$order_detail.reduction_percent}
                    {elseif $tax_excluded_display && (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)}
                        {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl+$order_detail.reduction_amount}
                    {elseif $tax_excluded_display}
                        {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl}
                    {elseif (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)}
                        {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl*100/$order_detail.reduction_percent}
                    {elseif (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)}
                        {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl+$order_detail.reduction_amount}
                    {else}
                        {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} 
                    {/if}
  • Kemudia save file tersebut dan hasilnya kurang lebih seperti gambar dibawah ini 
 result-invoice.jpg
 
 

Share this post


Link to post
Share on other sites

Hehe iya, tapi sih ini lebih ke Bugs juga, jadi saya sengaja posting di Laporan Bugs. :D

 

 

Thanks

 

-- 

Best regards,
Debe
Prestashop Developer

Phone    :   +689606112344
Skype   :   dbmaulana

Website :   http://debemaulana.com

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More