[英]How can I add a grand total in a shopping cart in woocommerce?
This is the code of my shopping cart subtotals (item x qty): 这是我的购物车小计(项目x数量)的代码:
<?php
echo apply_filters( 'yith_ywraq_hide_price_template' ,
WC()->cart->get_product_subtotal( $_product, $raq['quantity'] ));
?>
How can I add a grand total? 如何添加总计? (sum of all subtotals)
(所有小计的总和)
Thank you! 谢谢!
You can post more ( relevant ) code to have more possibilities of answers, but if you create a method in WC()->cart
Maybe can calculate the total amount. 您可以发布更多( 相关的 )代码来获得更多的答案,但是,如果在
WC()->cart
创建方法,也许可以计算总数。 WC()->cart->get_total_amout()
I think because WC()->cart
can handle with your basket. 我认为是因为
WC()->cart
可以处理您的购物篮。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.