Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am currently using the craft(5.0.1) theme, and I am editing the product page which is "main-product-liquid" in the editor. I know "product.price" means the price for one product, but if the customer orders two pieces, what code can i use to represent the total order value? I know "cart.total_price" means total order value in the cart page, but i don't know the code for product page. Thanks for help!
Hi @Fred729,
You need to use the code to plus 2 product prices, for example code:
{% assign price = product_1.price | plus: product_2.price %}
{{ price | money }}
{% comment %}
- product_1: set for product 1
- product_2: set for product 2
{% endcomment %}
Hope it helps!
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025