Re: Product description - add code there

Product description - add code there

Vlk1
Excursionist
23 1 0

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>

Replies 4 (4)

EBOOST
Shopify Partner
1196 310 352

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>

 

- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: [email protected]
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free
- ❤❤DONATE ❤❤Coffee tips
Vlk1
Excursionist
23 1 0

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

Vlk1_0-1715498689798.png

 

EBOOST
Shopify Partner
1196 310 352

Hi,

You must to put this code to liquid file.

1. Go to Store Online-> theme -> edit code

EBOOST_1-1672356985580.png

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.

- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: [email protected]
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free
- ❤❤DONATE ❤❤Coffee tips

BSSCommerce-HDL
Shopify Partner
2298 847 1061

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