How to show short description on product layout?
- magicwords
-
Topic Author
- Offline
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.2
-- PHP version -- : 5.5.15
-- Browser(s) name and version -- : Google Chrome
-- Error-message(debug-mod must be tuned on) -- : NA
Hello,
How to show a short product description on product page? I am selling books on website. I want to show that short product information besides the product image. i.e. The left side should show product image and the right side should show the short description and below both of them the quantity field and characteristics selection etc. should appear.
How to do this?
Please Log in or Create an account to join the conversation.
You have to edit the view "product / show_default".
hikashop.com/support/support/documentati...ize-the-display.html
To display a short description you can use such code:
Please Log in or Create an account to join the conversation.
For description of article I insert:
short description
How to avoid showing short description in full description?
Something like show and don't show intro text for Joomla article.
Thank you
Please Log in or Create an account to join the conversation.
So for the full description, you have to replace:
Please Log in or Create an account to join the conversation.
- magicwords
-
Topic Author
- Offline
Thank you. But can I actually display the short description which is not included in the main part? I mean the short-description besides the product image should be totally different than the one in the main description section. I am little bit confused.
Gaurav
Please Log in or Create an account to join the conversation.
Using the code given previously allow that, in the description add a separation thanks to the "readmore" button.
Then the code will display the text before the separation in the short description and the other one in the description.
An easiest way will be to use a custom field via the menu Display > Custom field, set it in the table "product", with a WYSIWIG type. Then in the product edition page, you will be able to fill the content of this custom field.
Then edit the view "product / show_default" and just use the following code to display the short description:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- magicwords
-
Topic Author
- Offline
Xavier wrote: Hi,
Using the code given previously allow that, in the description add a separation thanks to the "readmore" button.
Then the code will display the text before the separation in the short description and the other one in the description.
An easiest way will be to use a custom field via the menu Display > Custom field, set it in the table "product", with a WYSIWIG type. Then in the product edition page, you will be able to fill the content of this custom field.
Then edit the view "product / show_default" and just use the following code to display the short description:Code:<?php echo $this->element->YOUR_CUSTOM_FIELD_NAME; ?>
After which line should I add this quote?
Please Log in or Create an account to join the conversation.
Also you can add style with
Please Log in or Create an account to join the conversation.
- magicwords
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- magicwords
-
Topic Author
- Offline
Even after creating the custom field as instructed above and adding the code as suggested. I can't see the short description I added in new custom field.
Please Log in or Create an account to join the conversation.
Did you check our documentation for the display customization ?
www.hikashop.com/support/support/documen...-display.html#layout
You have to be sure that your overriding the view for the right template.
You can try to just put some raw HTML in order to know if you're editing the right view for the right template.
HikaShop have several product page layout (default, tabular, inversed) so you first have to be sure that your targeting the right file.
The documentatino page above, would help you for the general explanation, the schema details how the view are composed for the sub elements in the product page.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.