Add tab on product page
Please Log in or Create an account to join the conversation.
You have to edit the view "product / show_block_custom_main" and in the foreach add a PHP check in order to not display the desired fields, a check like:
Where of course "CUSTOM_FIELD1" and "CUSTOM_FIELD2" must be replaced by the custom field column name.
Please Log in or Create an account to join the conversation.
and it broke the website.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
If you have PHP errors ; please take a look at your PHP error log in order to have more details about your issue.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
My bad, there is a missing parentheses in the given code, you have to use this one instead:
To restrict on a user group, you have to add check on the user like that:
Please Log in or Create an account to join the conversation.
It doesn't cause any errors, but it also doesn't remove the fields from the Specifications tab.
So how would you do multiple groups?
Please Log in or Create an account to join the conversation.
1/ I just tried on my local to be sure, and the code:
Correctly remove the display of the custom product fields from the specifications tab.product / show_block_custom_main
So please check that the name you use is the same than the table name in the custom field settings. Another thing, are we talking about custom product fields or custom item fields ? If it is custom item fields so the view to edit is:
product / show_block_custom_item
2/ To check if one of the user groups match to one of the set groups you can use the code:
Please note that these modifications are customizations, and we generally don't support this kind of requests.
If you are not a developer, you can post your customization request in the commercial jobs section of this forum
Please Log in or Create an account to join the conversation.
Display → Views → Select (the correct) Template → Select Product → show_tabular
and replace:
<?php if($hide_specs == 0){ ?>
by
<?php if($hide_specs == 1){ ?>
So just change 0 to 1 you should find this line of code twice around line 20 and 260
It's a better solution then the CSS hide option(s) since Hikashop will not display or send any unneeded information and an update will not break or overwrite it.
Please Log in or Create an account to join the conversation.
Last question on this subject.
What am I doing wrong?
What I want it to do is if the group is one of the above listed, then it displays the sm_media field. If not, then do the sm_preview field. It's just displaying the the sm_preview field.
Please Log in or Create an account to join the conversation.
How do we put the related products in tabular?
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Please Log in or Create an account to join the conversation.
@webhelpus: What is the type of your custom fields ? If it is product custom fields, so using your code should be working.
If it is "Item" fields, so you need to use code as in the "show_block_custom_item" view to display the fields.
@aminweb: To display related products in a tab, you can edit the view "product / show_tabular" and add code like:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
So you will have to do some debug, you can use the "var_dump" PHP function for that.
This can help you so see the groups of your user and so why the if condition is not respected.
Please Log in or Create an account to join the conversation.
when add
Notice: Undefined property: stdClass::$product_description in C:\wamp\www\ponisha\components\com_hikashop\views\product\tmpl\show_tabular.php on line 262
this my show_tabular.php bottom part code :
other quest...!
how can I simillar description main duplication? means : i want two description main form => 1-description 2-other description
and show both in produst page
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Please Log in or Create an account to join the conversation.
To have two descriptions for one product, you can create a custom product field.
Then thanks to code like given in previous posts, you can display the desired descriptions where you want on the product page.
www.hikashop.com/support/documentation/4...shop-field-form.html
Please Log in or Create an account to join the conversation.
First, thank you for your efforts.
how can meta description form change to WYSIWYG editor? (It is essential)
and displaye in produact page tabullar, simiilar description,comment,...
Please explain in detail,very thanks
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Please Log in or Create an account to join the conversation.
If you have questions which are not related on "add tab on product page" (the title of that thread) ; please create a new thread.
Thanks for your understanding.
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
when add code for show related product in tab,Don`t worked Characterist variant
attach file : show_tabullar.php
Please log in or register to see it.
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Please Log in or Create an account to join the conversation.