Shopify themes, liquid, logos, and UX
Hi guys, I am looking for a way to add a specific code to the product description, which would display the product name (title) on one line and the SKU / Barcode for each variant on the second line (depending on which one is selected). I tried to add something in this style, but unfortunately, nothing works for me. Thank you.
<div class="card__content">
<div class="card__information">
<h3 class="card__heading">
<a href="{{ card_product.url }}" class="full-unstyled-link">
{{ card_product.title }}
</a>
</h3>
<div class="product-sku">
SKU: {{ card_product.sku }}
</div>
<div class="product-release-date">
Datum vydání: {{ card_product.release_date }}
</div>
</div>
</div>
Hi @Vlk1 ,
May I suggest code below:
<div class="card__content">
<div class="card__information">
<h3 class="card__heading">
<a href="{{ card_product.url }}" class="full-unstyled-link">
{{ card_product.title }}
</a>
</h3>
<div class="product-sku">
SKU: {{ card_product.selected_or_first_available_variant.sku }}
</div>
<div class="product-release-date">
Datum vydání: {{ card_product.published_at | date: "%a, %b %d, %y" }}
</div>
</div>
</div>
Hello, I have tried to put it there. It does not show what code suppose to show, it gets stucked on this. Do you have any idea why? Thank you
Hi,
You must to put this code to liquid file.
1. Go to Store Online-> theme -> edit code
2. snippets/card-product.liquid
3. Your screenshot used in the product page. So you need replace "card_product" to " product "
4. The case that is not work. Could you share your content of the file that you put code? I will help to add after that you only copy to replace old code.
Hi @Vlk1
Can you kindly download your theme and share your file zip with us or your theme name? We will help you check it and suggest you a solution.
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024