Custom Fields per product

  • Posts: 301
  • Thank you received: 1
11 years 2 months ago #123339

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.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 2 months ago #123355

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.

Please Log in or Create an account to join the conversation.

  • Posts: 301
  • Thank you received: 1
11 years 2 months ago #123976

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?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124007

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.

Please Log in or Create an account to join the conversation.

  • Posts: 301
  • Thank you received: 1
11 years 2 months ago #124010

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.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124062

You can edit the view "product / show_block_custom_main" and replace the current if condition:

if (!empty ($value)) {
By:
if (!empty ($value) || $value != 'none') {

Please Log in or Create an account to join the conversation.

  • Posts: 301
  • Thank you received: 1
11 years 2 months ago #124133

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.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124234

Sorry, little mistake, thanks to replace "||" by "&&".

Please Log in or Create an account to join the conversation.

  • Posts: 301
  • Thank you received: 1
11 years 2 months ago #124295

That worked - thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum