- Posts: 301
- Thank you received: 1
Custom Fields per product
13 years 2 weeks ago #123339
by Huski
Custom Fields per product was created by Huski
I have latest version of Hikashop essentials.
I created 3 custom fields which I show on the product page to advise customers of the various shipping methods. It works fine.
The problem is that these custom fields apply to some products but not all products, but there is no way of turning them off for a particular product - it shows all 3 every time.
Is there any way to fix this? Can't find the answer.
I created 3 custom fields which I show on the product page to advise customers of the various shipping methods. It works fine.
The problem is that these custom fields apply to some products but not all products, but there is no way of turning them off for a particular product - it shows all 3 every time.
Is there any way to fix this? Can't find the answer.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 2 weeks ago #123355
by Mohamed Thelji
Replied by Mohamed Thelji on topic Custom Fields per product
Hi,
Can you give us more information about the issue that you are having ? like how did you configured your custom fields, and for what kind of products they are showing, or not ?
showing it through some screenshots will be a good solution.
Can you give us more information about the issue that you are having ? like how did you configured your custom fields, and for what kind of products they are showing, or not ?
showing it through some screenshots will be a good solution.
Please Log in or Create an account to join the conversation.
13 years 2 weeks ago #123976
by Huski
Replied by Huski on topic Custom Fields per product
Have attached a screen shot - you can see where it says Item Shipped By: / Item Also Shipped By / Item Can Be
When I create a new product in admin these 3 headings show with drop down boxes with values. It seems that if I don't touch them at all and create the product and save, it is fine. But if I actually select a value against one of these custom fields, then they show on the front end. There is no way I can remove it.
I want these custom fields to show only on certain products. How can I do this?
When I create a new product in admin these 3 headings show with drop down boxes with values. It seems that if I don't touch them at all and create the product and save, it is fine. But if I actually select a value against one of these custom fields, then they show on the front end. There is no way I can remove it.
I want these custom fields to show only on certain products. How can I do this?
Please Log in or Create an account to join the conversation.
13 years 2 weeks ago #124007
by Xavier
Replied by Xavier on topic Custom Fields per product
Hi,
You have to create a third option, with for example the value "none" and set the option "disabled" (in the values listing) to "yes".
Then if you want to set nothing, you select "none".
This should hide the fields, so to hide it on some products just set nothing.
You can too select "none" as the default option, by this way it will not be displayed on the products.
You have to create a third option, with for example the value "none" and set the option "disabled" (in the values listing) to "yes".
Then if you want to set nothing, you select "none".
This should hide the fields, so to hide it on some products just set nothing.
You can too select "none" as the default option, by this way it will not be displayed on the products.
Please Log in or Create an account to join the conversation.
13 years 2 weeks ago #124010
by Huski
Replied by Huski on topic Custom Fields per product
Thanks - but its not working.
I have created the extra value "none" and set disable to Yes. Then I wen to the product and I chose None but they are still showing on the front end - it just shows the word "none" now - doesn't hide it.
I have created the extra value "none" and set disable to Yes. Then I wen to the product and I chose None but they are still showing on the front end - it just shows the word "none" now - doesn't hide it.
Please Log in or Create an account to join the conversation.
13 years 2 weeks ago #124062
by Xavier
Replied by Xavier on topic Custom Fields per product
You can edit the view "product / show_block_custom_main" and replace the current if condition:
By:
Code:
if (!empty ($value)) {
Code:
if (!empty ($value) || $value != 'none') {
Please Log in or Create an account to join the conversation.
13 years 2 weeks ago #124133
by Huski
Replied by Huski on topic Custom Fields per product
Thanks Xavier,
I have done what you have said but its still not working? Would it be a cache thing? I have refreshed screen - CTRL-R but still shows fields with None as a value.
I have done what you have said but its still not working? Would it be a cache thing? I have refreshed screen - CTRL-R but still shows fields with None as a value.
Please Log in or Create an account to join the conversation.
13 years 2 weeks ago #124234
by Xavier
Replied by Xavier on topic Custom Fields per product
Sorry, little mistake, thanks to replace "||" by "&&".
Please Log in or Create an account to join the conversation.
13 years 2 weeks ago #124295
by Huski
Replied by Huski on topic Custom Fields per product
That worked - thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.232 seconds