Custom field checkbox selection

  • Posts: 232
  • Thank you received: 4
  • Hikaserial Standard Hikashop Business
3 years 6 months ago #335105

-- url of the page with the problem -- : mxgroup-new.under-development.info/produ...-shower-tray-700x700
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.10

Hello,
I'm building a website and using custom fields for the additional product information. These custom fields contain various bits of information on the product.

I have a custom field setup as a multi select checkbox for each product. This will allow the client to then select the relevant icons they want to display on the frontend for each product. You can see the fields here:

mxgroup-new.under-development.info/produ...-shower-tray-700x700

It is the Icons section under the Specification title.

What I need to achieve is rather than render the label titles for the checkboxes selected is to substitute these values with images, either via CSS of using the show_block_custom_main.php override file and render each of the selected values separately as different values so they can then be styled.

So my logic would need to be:

IF icon = 25 Year Guarantee
render 25 year icon image
IF icon = CE Mark
render CE Mark image
etc, etc

How can I output the values from this custom field checkbox as individual, different values?

Thanks

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

  • Posts: 83403
  • Thank you received: 13497
  • MODERATOR
3 years 6 months ago #335110

Hi,

Well, you could do it with a view override and custom coding, but it would be easier to just change the "title" inputs of your custom field values you have the HTML of an img tag for your images.
That way, no need to change any code.

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

  • Posts: 232
  • Thank you received: 4
  • Hikaserial Standard Hikashop Business
3 years 6 months ago #335205

Nicolas,
That's awesome, would never have thought of that, I (wrongly) assumed it would be stripped of code when enter into the db table!

One final question, which file do I modify to remove the comma that is inserted between each entry?

Thanks

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

  • Posts: 83403
  • Thank you received: 13497
  • MODERATOR
3 years 6 months ago #335206

Hi,

You don't need to change any code.
Go in your PHPMyAdmin and add an entry with the namekey fields_multiple_values_separator in the table "hikashop_config". The value of the entry needs to be what you want to be used as separator. So it could be a space or a <br />

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

Time to create page: 0.053 seconds
Powered by Kunena Forum