I have been searching and cannot find an answer so hoping someone can help.
I am trying to get the line price to include the variant price.
At the moment I have the item image, item and variants displaying underneath… this is perfect. The issue is it adds the price as a seperate line at the bottom under “customization cost for …”.
I would love it to add the price in to the actual item price… or as I have displayed on the image below for Item Two, Ideally the original cost after the name and then the price displayed be the price including item and customization.
I hope the image below explains what I am trying to achieve.
To display the variant price and the customization price together as the line price in your Shopify store, you will need to modify your theme’s Liquid code.
Assuming you are using the “line_item” Liquid object to display the line item information, you can update the code that displays the line item price to include the variant price and the customization price. Here is an example:
In this code, we first assign the current line item price, variant price, and customization price to variables using the Liquid money filter. Then, we check if the customization price is non-zero. If it is, we assign the total line item price (which includes the variant price and customization price) to the line_price variable. If it isn’t, we assign the variant price to the line_price variable.
Finally, we display the line_price variable using the Liquid money filter and the appropriate HTML markup for your theme.
You may need to adjust the code to match the structure and variables used in your theme, but this should give you an idea of how to modify the code to achieve your desired result
Is this for the email? On my cart page the price is combined, it is just for the email that I would like it combined. I added your code to the email but it did not work.