Short description of the product

  • Posts: 68
  • Thank you received: 0
11 years 9 months ago #122002

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: 11 years 9 months ago by kopretina.

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

  • Posts: 83992
  • Thank you received: 13604
  • MODERATOR
11 years 9 months ago #122034

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.

  • Posts: 68
  • Thank you received: 0
11 years 9 months ago #122094

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.

  • Posts: 12953
  • Thank you received: 1778
11 years 9 months ago #122101

Hi,

You'll be able to do it by using the "substr" php option :

<!-- 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.

  • Posts: 68
  • Thank you received: 0
11 years 9 months ago #122105

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.064 seconds
Powered by Kunena Forum