ps2k11 Posted August 23, 2018 Share Posted August 23, 2018 Using Prestashop 1.7.4.2 I found this information to add total in shopping cart summary <span class="label">Total (tax + shipping incl.)</span> <span class="value">{$currency.iso_code}{$currency.sign}{$cart.totals.total.amount+$cart.subtotals.tax.amount}</span> I use different languages, want translate the label Total (tax + shipping incl.) but not sure how to in previous versions of prestashop the l s would add labels in translations but not version 1.7 Not sure why no total in cart summary, I guess customer have to use a calculator now 1 Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 23, 2018 Share Posted August 23, 2018 Hi, Use the line mentioned below & then translate the same from the backend. {l s='Total (tax + shipping incl.)' d='Shop.Forms.Labels'} I hope it will help. Link to comment Share on other sites More sharing options...
ican Posted August 24, 2018 Share Posted August 24, 2018 13 hours ago, ps2k11 said: Using Prestashop 1.7.4.2 I found this information to add total in shopping cart summary <span class="label">Total (tax + shipping incl.)</span> <span class="value">{$currency.iso_code}{$currency.sign}{$cart.totals.total.amount+$cart.subtotals.tax.amount}</span> I use different languages, want translate the label Total (tax + shipping incl.) but not sure how to in previous versions of prestashop the l s would add labels in translations but not version 1.7 Not sure why no total in cart summary, I guess customer have to use a calculator now follow as per Knowband suggested you then go to Backoffice international/translation. Select your theme and language to modify it in your language. Link to comment Share on other sites More sharing options...
pierre13 Posted September 3, 2018 Share Posted September 3, 2018 Hi, Use in Prestashop 1.7.4.2 with two digits after the decimal point and the translations !! - for cart-summary-totals.tpl {block name='cart_summary_total'} <div class="cart-summary-line cart-total"> <span class="label">{l s='Total (tax + shipping incl.)' d='Shop.Forms.Labels'}</span> <span class="value">{$cart.totals.total.amount + $cart.subtotals.tax.amount|string_format:"%.2f"} {$currency.sign}</span> </div> {/block} ----------------------------------------------------- - For order-confirmation-table.tpl <tr class="font-weight-bold"> <td><span class="text-uppercase">{$totals.total.label}</span> {$labels.tax_short}</td> <td>{$totals.total.value}</td> </tr> <tr class="font-weight-bold"> <td><span class="text-uppercase">{l s='Total' d='Shop.Forms.Labels'}</span></td> <td>{$totals.total.amount + $subtotals.tax.amount|string_format:"%.2f"} {$currency.sign}</td> </tr> </table> ---------------------------------------------------- - For cart_detailed_totals.tpl {block name='cart_detailed_totals'} <div class="cart-detailed-totals"> <div class="card-block"> {foreach from=$cart.subtotals item="subtotal"} {if $subtotal.value && $subtotal.type !== 'tax'} <div class="cart-summary-line" id="cart-subtotal-{$subtotal.type}"> <span class="label{if 'products' === $subtotal.type} js-subtotal{/if}"> {if 'products' == $subtotal.type} {$cart.summary_string} {else} {$subtotal.label} {/if} </span> <span class="value">{$subtotal.value}</span> {if $subtotal.type === 'shipping'} <div><small class="value">{hook h='displayCheckoutSubtotalDetails' subtotal=$subtotal}</small></div> {/if} </div> {/if} {/foreach} </div> {block name='cart_voucher'} {include file='checkout/_partials/cart-voucher.tpl'} {/block} <hr class="separator"> <div class="card-block"> <div class="cart-summary-line cart-total"> <span class="label">{$cart.totals.total.label} {$cart.labels.tax_short}</span> <span class="value">{$cart.totals.total.value}</span> </div> <div class="cart-summary-line"> <small class="label">{$cart.subtotals.tax.label}</small> <small class="value">{$cart.subtotals.tax.value}</small> </div> <div class="cart-summary-line cart-total"> <span class="label">{l s='Total' d='Shop.Forms.Labels'}</span> <span class="value">{$cart.totals.total.amount + $cart.subtotals.tax.amount|string_format:"%.2f"} {$currency.sign}</span> </div> </div> <hr class="separator"> </div> {/block} Salut Link to comment Share on other sites More sharing options...
pierre13 Posted September 3, 2018 Share Posted September 3, 2018 Attached file cart-detailed-totals.tpl cart-summary-totals.tpl order-confirmation-table.tpl Link to comment Share on other sites More sharing options...
marcone79 Posted October 17, 2018 Share Posted October 17, 2018 ok thank you very much but how do I put with the right decimals:es. now the total is 2655.45 and I want you to see 2.655,45how can I dothank you Link to comment Share on other sites More sharing options...
dinesh badrukhiya Posted October 18, 2018 Share Posted October 18, 2018 17 hours ago, marcone79 said: ok thank you very much but how do I put with the right decimals:es. now the total is 2655.45 and I want you to see 2.655,45how can I dothank you You can refer this tutorial. How to change the number of decimal points in product price Best Regards. Link to comment Share on other sites More sharing options...
marcone79 Posted October 18, 2018 Share Posted October 18, 2018 thank you very much, but the rest of the site works correctly and only with the function used {$ cart.totals.total.amount + $ cart.subtotals.tax.amount | string_format: "%. 2f"} {$ currency.sign} that the price is not correctly formatted, Link to comment Share on other sites More sharing options...
marcone79 Posted October 18, 2018 Share Posted October 18, 2018 screen shot Link to comment Share on other sites More sharing options...
thymus Posted April 7, 2019 Share Posted April 7, 2019 To format the total correctly replace |string_format:"%.2f" WITH |number_format:2:".":"," OR |number_format:2:",":"." depending on which format you require. Link to comment Share on other sites More sharing options...
joanna Posted April 23, 2019 Share Posted April 23, 2019 Thank you for this solution. I have a problem though. When i change language to english the euro icon goes to the front of the price in the rest of the page. The only currency for the shop is euros. Is there a way to change to placement for english to front of the price and for Greek language to the back? Link to comment Share on other sites More sharing options...
Tiankong Posted May 16, 2019 Share Posted May 16, 2019 (edited) Thank you for sharing it. I have another concern, about the item price total is displayed in TTC in the cart, how to view HT Edited May 16, 2019 by sikajeans (see edit history) Link to comment Share on other sites More sharing options...
swatantra Posted May 28, 2019 Share Posted May 28, 2019 I have a Prestashop 1.7 multistore where I need to get the shipping cost from variable (instead of writing it in normal text) since the shipping cost varies a lot depending on chosen currency. I want to be able to get this in the header, and on the index/homepage. I currently use this in the header to get the shipping: {$cart.subtotals.shipping.amount} And that works fine, except for when the cart is empty or when the free shipping amount is triggered. :( Is there a way to get the default shipping cost even when the cart is empty and such? Link to comment Share on other sites More sharing options...
8ternity Posted September 5, 2019 Share Posted September 5, 2019 On 9/3/2018 at 3:31 AM, pierre13 said: Attached file cart-detailed-totals.tpl cart-summary-totals.tpl order-confirmation-table.tpl Does it work for 1.7.5.X ? I want to use it with this version. Link to comment Share on other sites More sharing options...
8ternity Posted October 10, 2019 Share Posted October 10, 2019 Answered by myself, Yes it's worked. Thanks. Link to comment Share on other sites More sharing options...
rmx333 Posted October 23, 2019 Share Posted October 23, 2019 Hello, My version of Prestashop 1.7.5.1 is making the changes described in / Themes / warehouse / templates / checkout / _partials / No change is visible. Clearing cache doesn't help. I did it from the administration panel and from the ftp level. Link to comment Share on other sites More sharing options...
divamvak Posted October 24, 2019 Share Posted October 24, 2019 On 10/23/2019 at 2:18 PM, rmx333 said: Hello, My version of Prestashop 1.7.5.1 is making the changes described in / Themes / warehouse / templates / checkout / _partials / No change is visible. Clearing cache doesn't help. I did it from the administration panel and from the ftp level. I have also Wharehouse . I did from Plek in cart-summary-totals.tpl and works fine. I did the chage also in order-confirmation-table.tpl but nothing visible. Is it different from FTP ? Link to comment Share on other sites More sharing options...
Maurice Posted June 25, 2020 Share Posted June 25, 2020 Hello i try the following files : cart-detailed-totals.tpl 2.58 kB · 46 downloads cart-summary-totals.tpl 1.78 kB · 39 downloads order-confirmation-table.tpl 5.15 kB · 37 downloads i think they work perfectly but only one thing in the first step something like that on screen shoot In other word i did not get the total amount included V.a.t. in the second and third step everything is ok , shall anyone tell me how to get price with v.a.t. on chart? Thanks Regards Maurice Link to comment Share on other sites More sharing options...
woxfer Posted July 25, 2020 Share Posted July 25, 2020 (edited) Worked for 1.7.6.5 , Thanks Edited July 25, 2020 by woxfer language (see edit history) Link to comment Share on other sites More sharing options...
msarmiento Posted September 22, 2021 Share Posted September 22, 2021 (edited) {$ cart.totals.total.amount + $ cart.subtotals.tax.amount | string_format: "%. 2f"} {$ currency.sign} replace for {$cart.totals.total_including_tax.value} the full div would be <div class = "cart-summary-line cart-total"> <span class = "label"> {$ cart.totals.total_including_tax.label} </span> <span class = "value"> {$ cart.totals.total_including_tax.value} </span> </div> Edited September 22, 2021 by msarmiento (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now