- Posts: 161
- Thank you received: 8
Product intro information
- Crashbandi
-
Topic Author
- Offline
-- HikaShop version -- : 4.0.2
-- Joomla version -- : 3.9.5.
-- PHP version -- : 7.1.28
Hi,
The intro information stops midway through the words (please see attached). Is there a way to have separate entries for the intro text and the full description?
Please Log in or Create an account to join the conversation.
If you want it to cut at a certain place, you can add a read more tag to your product description.
Your product page layout is already heavily customized so I'm not sure what code you have to display the intro information.
By default, it's this code:
That code is normally in the product/show_tabular.php view file that you can edit via the menu Display>Views.
You can use the "Display view files" setting of the HikaShop configuration to know which view file is used where in HikaShop
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
This is a bit complex for me, but I'm going to give it a go.
Can I ask, would it be possible to point the intro information to the new custom field via css? The reason I ask is because I don't want any future Hikashop updates overwriting any changes.
Regards,
Colin.
Please Log in or Create an account to join the conversation.
It's not possible to do that via CSS. Note however that if you do view files modifications via the menu Display>Views, these modifications will be saved as view overrides and you won't loose them when you update HikaShop in the future.
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
I have added the custom field and edited the file product/show_tabular.php. Everything seems ok in the back end, but the input does not show in the front end. The custom field is in the products table and is set to show in the front-end, back-end form and back-end-listing.
Any ideas why it is not showing? Here is my code change:
Please Log in or Create an account to join the conversation.
Your code is wrong (it will only display if you have more than 300 characters in the custom field) and you don't need all that code.
You can just do:
echo JHTML::_('content.prepare',$this->element->product_intro);
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
So it should look like this?:
<div id="hikashop_product_intro_main_mini" class="hikashop_product_description_main_mini"><?php
echo JHTML::_('content.prepare',$this->element->product_intro);
?></div>
Regards,
Colin
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
It seems to working with this code;
<div id="hikashop_product_intro_main_mini" class="hikashop_product_description_main_mini"><?php
if(!empty($this->element->product_intro)) {
echo JHTML::_('content.prepare',$this->element->product_intro);
}
?></div>
Could you just double check it for me.
Thanks very much.
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
I've just noticed that the intro text is also appearing in the 'Specification' tab?
Could you take a look please:
banobathrooms-co-uk.stackstaging.com/sui...duct/16-black-cotton
Please Log in or Create an account to join the conversation.
The code is good.
You want to turn off the display setting of the custom field (via the menu Display>Custom fields) since you're displaying it yourself. That way, it won't appear in the specifications tab.
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
Thanks for your help with this Nicolas.
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
I am working on a site at www.luxminime.com/en/new-in/product/387-test-girls-jacket
I would like the product description to display as standard Hikashop. So, I don't want the Description or the Specifications tabs at the bottom of the page.
i have deleted the custom fields, but I'm not sure what to change in 'show_tabular'. I have attached the file and was hoping you could take a look for me.
Thanks.
Colin.
Please Log in or Create an account to join the conversation.
I'm not sure what you mean.
Do you mean that you don't want tabs at all ? In that case you can change the "layout on product page" setting of the HikaShop configuration to "default".
Or do you mean you only don't want the description and specification tabs ?
In that case, you can remove that code:
Or maybe you mean you want the tabs like they are by default in HikaShop, on top of the tab content instead of being on the side ?
Or maybe something else ?
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
Yes, I would like to just have the description under the price with no tabs or comments. I have attached a screenshot.
Regards,
Colin
Please Log in or Create an account to join the conversation.
Then, turn off the votes and comments in the HikaShop configuration. That will remove the comments area.
And then, you can leave the description empty and fill in the "product_intro" custom field instead and it should display where you want it.
Finally, you can do the modification I talked previously to remove the description and specifications tabs and that should leave you with a page resembling your last image.
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
OK I did everything, including the removal of the code. It looks good, but I still have the Description and Specifications tabs?
Regards,
Colin
Please Log in or Create an account to join the conversation.
Then, also remove that part:
Please Log in or Create an account to join the conversation.
- Crashbandi
-
Topic Author
- Offline
- Posts: 161
- Thank you received: 8
Thanks. It seems fine now.
Regards,
Colin.
Please Log in or Create an account to join the conversation.