Display Icon/Image next to Name of custom field

  • Posts: 149
  • Thank you received: 0
12 years 11 months ago #32015

Hi,

I am interested in displaying a small icon/image next to the name value of a custom Field.
Example:


->New custom field introduced "product_brand", of type radio box

-> Available values
Value Name
Brand1 Brand1
Brand2 Brand2
... ...

-> Product A has product_brand=Brand1

->What is needed:
1. On Filter Module a small icon is shown next to each Brand value (each value has its own icon)

2. At the product page next to the brand value the respective icon is shown


is there a way to associate also an icon to the values of a custom field? (apart from name and value)


Thanks

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 11 months ago #32042

Hi,

You could try to use the translation system by adding an override like that:

BRAND1="My brand<img src=' mywebsite.com/myimage.png ' />"

Then in your custom field, you could use BRAND1 in the "Name" of the value and it should be replaced when displaying the custom field.

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

  • Posts: 149
  • Thank you received: 0
12 years 11 months ago #32119

Hi Nikolas,

I am not sure I understand how to use the translation system :)

I did the following two solutions:
1. Updated the Joomfish Content Element xml file to include my custom field. Now translation supports translating the value of the field per product.
Problems:
a. Cannot edit base language (not sure why) so the icon will not appear in the base language of the site
b. Need to do it per product
c. Icon Does not appear in the filter of this field

2. Altered the value manually directly from the table using phpmyadmin. Table "hikashop_field" and edited the column "field_value" (included the src=image" tag). It works as well and for both pages (product details and Filter page)

So I am proceeding with option 2 and if the client wants translation on these labels as well, I will update the content elements in JoomFish accordingly.

Let me know if you think there is something wrong

Thanks for the help

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 11 months ago #32153

Yes. If you a familiar with phpmyadmin, option 2 is indeed simpler. You should go with that.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum