Skip to main content

Short description of the product

More
13 years 4 weeks ago - 13 years 4 weeks ago #122002 by kopretina
Hello,

I use the layout the "title and description" to display the list of product. I have short description next to the picture. I have to put the break tag to the each product in the description manualy to see the short description.

Is there any possibility how to put the this tag somewhrere directyl to php, and display let say first 150 symbols from the description of the product?
Our client doesn´t want to do that manualy.

Thanks for help.
Last edit: 13 years 4 weeks ago by kopretina.

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #122034 by nicolas
Hi,

You can edit the file "listing_img_desc" of the view "product" via the menu Display>Views to change the display of the description and cut it how you want instead of the default way.

Please Log in or Create an account to join the conversation.

More
13 years 3 weeks ago #122094 by kopretina
Hi Nicolas,

thank you very much for your help.

I have stil some question. I know how to call the text which should appeare in this place.
But how can I say that will appear only firs x characters? Could you help me, please?

Now I have this:
<!-- PRODUCT DESCRIPTION -->
<div class="hikashop_product_desc" style="text-align:<?php echo $this->align; ?>">
<?php
echo $this->row->product_description;
?>
</div>
<!-- EO PRODUCT DESCRIPTION -->

Please Log in or Create an account to join the conversation.

More
13 years 3 weeks ago #122101 by Mohamed Thelji
Hi,

You'll be able to do it by using the "substr" php option :
Code:
<!-- PRODUCT DESCRIPTION --> <div class="hikashop_product_desc" style="text-align:<?php echo $this->align; ?>"> <?php echo substr($this->row->product_description, 0, 25); ?> </div> <!-- EO PRODUCT DESCRIPTION -->
Ps: you can replace 25 by your x characters number :).

Please Log in or Create an account to join the conversation.

More
13 years 3 weeks ago #122105 by kopretina
Thank you very much for quick help.

The number at the end is clear to me. :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.200 seconds
Powered by Kunena Forum