Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
We are trying to get the product name in the checkout page.
We tried:
‘{{ line_item.product.title }}’
{{ item.variant.title }}
{{ line_item.product.title }}
However, none of these work to retrieve the product title during the checkout.
We have this issue only receiving the product title, e.g, {{ line_item.price }} returns us the total amount during the checkout.
Hello There,
By default when a product is added to cart and then checkout so it will automatically show the product name and price by default.
So could you kindly brief the issue and your requirement by sharing some screenshots so that I can assist you further on it.
Use
{{ checkout.line_items[0].product.title }}
to get the title of the first product in the cart or iterate though all line items like:
{% for item in checkout.line_items %}
<script>
console.log('{{item.product.title}}');
</script>
{% endfor %}
*Shopify plus on checkout.liquid, soon to be depracted.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024