Add Link into Custom Field

  • Posts: 50
  • Thank you received: 1
12 years 1 month ago #71026

Hi,

In my product page, I want to have a custom field which can link to another page. For example:

I have a custom field "Topics" for products.
In product details page of Book A, the topic is Business. I would like the user be able to click on the Business topic and link it to another page that talks about Business matters.

In the Custom Field setup, I tried put the following setup for "Topics" custom field.
Custom Field Type: Checkbox
Title: Business
Value: <a href=" www.mysite.com/Business-Topics ">Business</a>

But it would truncate the "a href" code each time I save it in the Custom Field setup page.

Is there any workaround I can "add links" to the values in custom field?

Thanks.

Last edit: 12 years 1 month ago by hawkeyentjc.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 1 month ago #71339

Hi,

The html tags are removed to avoid a xss injection.
It could be possible in a future version of HikaShop with a new plugin.

Isn't possible for you to add this link in the product description ?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 1 month ago #71470

Hi,

In custom fields, there is the option "Input filtering" that you can turn off to disable the XSS filtering of the field. Then, you will be able to do what you want.

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

  • Posts: 120
  • Thank you received: 1
11 years 7 months ago #99660

Hi Nicolas,
It is a useful advice, thanks for that.
However, it only removes filtering of Custom Field's value. In my case I need to cancel filtering of Custom Field names, when I create a custom field in the back end.

I thought this is something to do with Joomla settings rather than Hikashop settings. Then I went to Joomla's Global Configuration -> Text Filters and set my value to "NO FILTERING".
This did not resolve my problem.

Do you think there is an easy way to put a ling tag into a product's custom field name? Actually, my target is to put some reference to a help section, explaining what is the particular custom field, for example:
"Power, h.p., J1349 [a href='#'] (What is this?) [/a]:"

Thanks

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 7 months ago #99668

You're not using the good approach.

You should enter a translation key in the field name like MY_FIELD for example.

Then in your translation override area, you can add that translation key with all the HTML you want:

MY_FIELD="<a href='http://google.com'>search</a>"

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

  • Posts: 120
  • Thank you received: 1
11 years 7 months ago #99811

Hikashop is so flexible and your support is so perfect!

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

Time to create page: 0.082 seconds
Powered by Kunena Forum