Prestashop - basket total price
it's me again with anoth开发者_如何学运维er Prestashop question.
In my template, I'd like to display total price in basket (cart) without using the module there, jsut simply display total price there and link to the basket ... is there a function, that will get this information from within the system?
gettotalprice
Or something like that?
if you use the prestashop version 1.5 you should use this:
Context::getContext()->cart->getOrderTotal(true);
best regards
Yes, there is and it's a SMARTY function which you can use in your templates: {$cart->getOrderTotal(true)}
, though it only works up to Prestashop v1.5
, as noted in the comment below.
The code above will display total cart price with tax. If you don't want tax to be included in your total, change the parameter from true
to false
.
For Prestashop v1.5+
you should use: Context::getContext()->cart->getOrderTotal(true);
精彩评论