Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

colorful-ant

Niara theme - short description

Recommended Posts

Posted (edited)

I have adapted the Niara Theme with the product lists. The short description is / was only visible in the list view. (image 1 & 2)

 

After the change, the short description is also visible in the grid view. (image 3 & 4)

niara / product-list-item.tpl

old

            {if isset($product.is_virtual) && !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
            {hook h="displayProductPriceBlock" product=$product type="weight"}

            <p class="product-desc hide-if-product-grid" itemprop="description">
                {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
            </p>
        </div>

delete this

            <p class="product-desc hide-if-product-grid" itemprop="description">
                {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
            </p>

 

find 

                            {hook h="displayProductPriceBlock" product=$product type="price"}
                            {hook h="displayProductPriceBlock" product=$product type="unit_price"}
                            {hook h="displayProductPriceBlock" product=$product type='after_price'}
                        {/if}
                    </div>

add 

            <p class="product-desc" itemprop="description">
                {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
            </p>

it looks now old

            {if isset($product.is_virtual) && !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
            {hook h="displayProductPriceBlock" product=$product type="weight"}
        </div>

        <div class="product-actions-container">

it lokks now new

                            {hook h="displayProductPriceBlock" product=$product type="price"}
                            {hook h="displayProductPriceBlock" product=$product type="unit_price"}
                            {hook h="displayProductPriceBlock" product=$product type='after_price'}
                        {/if}
                    </div>
            <p class="product-desc" itemprop="description">
                {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
            </p>
                {/if}

 

and you can change the truncate from 360 to 180 or 240 ..... - your text limit

short-descirption-alt-grid.png

short-descirption-alt-list.png

short-descirption-neu-grid.png

short-descirption-neu-list.png

Edited by colorful-ant
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks, looks great. I will use this. Maybe @tommat adds this option in the Niara theme 🙂

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...