[Skip to main content](#vessel-content)

#   Linkable custom field

##

- **[lucky93](/forum/user/5796-lucky93 "View lucky93's Profile")**
- [![lucky93's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5796-lucky93 "View lucky93's Profile") Topic Author
- [ Offline](/forum/user/5796-lucky93)

Less More

- Posts: 10
- Thank you received: 0
-
-

14 years 4 weeks ago [\#68643](#68643) by [lucky93](/forum/user/5796-lucky93 "View lucky93's Profile")  *[Linkable custom field](/forum/4-how-to/68643-linkable-custom-field#68643 "I like to create a custom field for example &quot;More info&quot; &quot;More info&quot; will listing on backend products information and I can key-in an external link address for example   www.google.com  Visitor will be link to   www.google.com  when click &quot;More info&quot; May I know how to do this ?")* was created by *[lucky93](/forum/user/5796-lucky93 "View lucky93's Profile")*

I like to create a custom field for example "More info"
"More info" will listing on backend products information and I can key-in an external link address for example [ www.google.com](http://www.google.com)
Visitor will be link to [ www.google.com](http://www.google.com) when click "More info"
May I know how to do this ?

[ ![Untitled4&#95;2012-10-04.jpg](/forum/attachment/6126) ](/forum/attachment/6126 "...2012-10-04.jpg")

- [ ![Untitled4&#95;2012-10-04.jpg](/forum/attachment/6126) ](/forum/attachment/6126 "...2012-10-04.jpg") [ ](/forum/attachment/6126?download=1 "...2012-10-04.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY4NjQzLWxpbmthYmxlLWN1c3RvbS1maWVsZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

14 years 4 weeks ago [\#68809](#68809) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Linkable custom field](/forum/4-how-to/68643-linkable-custom-field#68809 "I like to create a custom field for example &quot;More info&quot; &quot;More info&quot; will listing on backend products information and I can key-in an external link address for example   www.google.com  Visitor will be link to   www.google.com  when click &quot;More info&quot; May I know how to do this ?")*

Hi,

In your custom field, you can enter your link like that:
&lt;a href='[ www.google.com](http://www.google.com)'&gt;More info&lt;/a&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY4NjQzLWxpbmthYmxlLWN1c3RvbS1maWVsZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[shiva](/forum/user/8394-shiva "View shiva's Profile")**
- [![shiva's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8394-shiva "View shiva's Profile")
- [ Offline](/forum/user/8394-shiva)

Less More

- Posts: 15
- Thank you received: 0
-
-

14 years 4 weeks ago [\#68827](#68827) by [shiva](/forum/user/8394-shiva "View shiva's Profile")  Replied by *[shiva](/forum/user/8394-shiva "View shiva's Profile")* on topic *[Re: Linkable custom field](/forum/4-how-to/68643-linkable-custom-field#68827 "I like to create a custom field for example &quot;More info&quot; &quot;More info&quot; will listing on backend products information and I can key-in an external link address for example   www.google.com  Visitor will be link to   www.google.com  when click &quot;More info&quot; May I know how to do this ?")*

Thank you, I's working.
How to do if I want to open NEW windows to display link page ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY4NjQzLWxpbmthYmxlLWN1c3RvbS1maWVsZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

14 years 4 weeks ago [\#68833](#68833) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Linkable custom field](/forum/4-how-to/68643-linkable-custom-field#68833 "I like to create a custom field for example &quot;More info&quot; &quot;More info&quot; will listing on backend products information and I can key-in an external link address for example   www.google.com  Visitor will be link to   www.google.com  when click &quot;More info&quot; May I know how to do this ?")*

Like that:
&lt;a href='[ www.google.com](http://www.google.com)' target='_blank'&gt;More info&lt;/a&gt;

The following user(s) said Thank You: [shiva](/forum/user/8394-shiva "View shiva's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY4NjQzLWxpbmthYmxlLWN1c3RvbS1maWVsZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[idemsisvoje](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")**
- [![idemsisvoje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")
- [ Offline](/forum/user/8607-idemsisvoje)

Less More

- Posts: 6
- Thank you received: 1
-
-

13 years 11 months ago [\#76950](#76950) by [idemsisvoje](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")  Replied by *[idemsisvoje](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")* on topic *[Re: Linkable custom field](/forum/4-how-to/68643-linkable-custom-field#76950 "I like to create a custom field for example &quot;More info&quot; &quot;More info&quot; will listing on backend products information and I can key-in an external link address for example   www.google.com  Visitor will be link to   www.google.com  when click &quot;More info&quot; May I know how to do this ?")*

Hi,
thanks, this topic was helpful.
However, I wonder if it would be possible to create this extra field in such way, that it won't be necessary to write HTML all the time, just to insert external URL when creating a product. I tried to play with field's default value, but it didn't work.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY4NjQzLWxpbmthYmxlLWN1c3RvbS1maWVsZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#76994](#76994) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Linkable custom field](/forum/4-how-to/68643-linkable-custom-field#76994 "I like to create a custom field for example &quot;More info&quot; &quot;More info&quot; will listing on backend products information and I can key-in an external link address for example   www.google.com  Visitor will be link to   www.google.com  when click &quot;More info&quot; May I know how to do this ?")*

Hi,

You can use view override to do such thing.
The view "shop_block_custom_main" display product custom fields for the product page.
The PHP code loop on all product custom field and display them.
You can modify the view and add some specific code in order to have specific display.

Like: Code:

foreach ($this-&gt;fields as $fieldName =&gt; $oneExtraField) { $value = ''; if(empty($this-&gt;element-&gt;$fieldName) &amp;&amp; !empty($this-&gt;element-&gt;main-&gt;$fieldName))$this-&gt;element-&gt;$fieldName = $this-&gt;element-&gt;main-&gt;$fieldName; if(isset($this-&gt;element-&gt;$fieldName)) $value = trim($this-&gt;element-&gt;$fieldName); if (!empty ($value)) { /* Begin of code to insert */ if($fieldName == 'customlink') { echo '&lt;tr class="hikashop_product_custom_'.$oneExtraField-&gt;field_namekey.'&gt;_line"&gt;&lt;td colspan="2"&gt;&lt;a href="'.$value.'" target="_blank"&gt;More info&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;'; continue; } /* End of code to insert - Do not touch the rest */ ?&gt;

And replace the "customlink" but the name of your custom field.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [idemsisvoje](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY4NjQzLWxpbmthYmxlLWN1c3RvbS1maWVsZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[idemsisvoje](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")**
- [![idemsisvoje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")
- [ Offline](/forum/user/8607-idemsisvoje)

Less More

- Posts: 6
- Thank you received: 1
-
-

13 years 11 months ago [\#77226](#77226) by [idemsisvoje](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")  Replied by *[idemsisvoje](/forum/user/8607-idemsisvoje "View idemsisvoje's Profile")* on topic *[Linkable custom field](/forum/4-how-to/68643-linkable-custom-field#77226 "I like to create a custom field for example &quot;More info&quot; &quot;More info&quot; will listing on backend products information and I can key-in an external link address for example   www.google.com  Visitor will be link to   www.google.com  when click &quot;More info&quot; May I know how to do this ?")*

Super, i managed to make it work in less than 3 minutes. Thanks a lot!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY4NjQzLWxpbmthYmxlLWN1c3RvbS1maWVsZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.069 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
