- Posts: 7
- Thank you received: 0
Short description at the product listings
- uniteddare
-
Topic Author
- Offline
At the product listings page there is some room between product image and price so I would like to know whether it is possible to fill this space with a brief description of the goods?
Thanks
Please Log in or Create an account to join the conversation.
<?php echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description); ?>
Please Log in or Create an account to join the conversation.
- uniteddare
-
Topic Author
- Offline
- Posts: 7
- Thank you received: 0
Please Log in or Create an account to join the conversation.
www.hikashop.com/en/support/forum/4-how-...ml?limit=20&start=20
Please Log in or Create an account to join the conversation.
- uniteddare
-
Topic Author
- Offline
- Posts: 7
- Thank you received: 0
This code <?php echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description); ?> was also added to pointed here files and still nothing.
Can you make some advice?
Please Log in or Create an account to join the conversation.
<?php echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description); ?>
is for displaying the description.
If you want to display a read more link, you should add the code :
echo '<a href="'.$link.'">Read more</a>';
Also, make sure that you're editing the correct file (for the template you're using, not for another template).
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I will Love you to Break this down for me
I want to Add Read more & Short Description to my Product Listing page
So i have Opened a File in my Tem Name is : listing_img_title
And this the code i got frm you
Now i got Confused on were to put those lines of script
Could love if you help solve
This the whole Line of code in the File
Thanks will love if you can solve
Thanks for quick response in Advance
Please Log in or Create an account to join the conversation.
The importation question is : where you do you want to display the product description exactly ?
Before the price ? Before the vote ? Before the add to cart ? at the bottom ?
For example, if you want to display it at the bottom, you just have to paste the code that Nicolas gave you ; at the bottom of the code you pasted ; in order to have something like that:
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Posts: 31
- Thank you received: 0
We need tu show a custom field in product listing but only show the first two lines and "...". Is it possible? Regards, Leo.
Please Log in or Create an account to join the conversation.
I think you use an Item Custom field and create an override view, you need to have html & php knowledge, follow these steps :
- First, go to Components => HikaShop => Configuration
- Then in Display dropdown select Custom fields
- Click on New
- Reproduce this settings :
And add your custom code in order to have your custom field display on your listing view :
- Define which listing type you use among listing, div or tabular
- Go in your Main HikaShop Configuration part (like previous)
- On Display dropdown this time select Views
- Use 3 filter dropdown with Product/YourTemplate/Front end
- Select your required among listing_div, listing_list or listing_table
- Add where required this code to display your custom field :
And to see how to proceed, see this tutorial .
After this you will have to full your custom field directly in your product backend configuration.
Hope this will help you to achieved what you wants.
Regards
Please Log in or Create an account to join the conversation.
- Posts: 31
- Thank you received: 0
Please Log in or Create an account to join the conversation.
There is no setting for that.
You need to use custom code to strip the value of the custom field to 2 lines like you want.
The simplest would be to do something like that:
<?php echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->prod_desc); ?>
and add a read more tag in your custom field editor where you want the cut to be done.
Please understand that custom coding like that is outside of the user support we provide. We've already gave you all the necessary information to know how to do it if you're a developer. If you're not a developer, we have partners you can contact for such custom development job:
www.hikashop.com/home/our-partners.html
Please Log in or Create an account to join the conversation.