开发者

Prestashop - basket total price

开发者 https://www.devze.com 2023-03-15 17:12 出处:网络
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 the

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);

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号