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

#   Add button next to a characteristic

##

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

3 months 4 weeks ago [\#372671](#372671) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  *[Add button next to a characteristic](/forum/26-product-category-display/910681-add-button-next-to-a-characteristic#372671 "-- HikaShop version -- : 6.5.1 -- Joomla version -- : 6.1.2  Hi!  Is it possible to add a button next to one characteristic? For example there are 4 characteristics in this product, one of them is color. What i want, is to add a button that opens a PDF file next to it with details of the colors.  Thank you")* was created by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")*

-- HikaShop version -- : 6.5.1
-- Joomla version -- : 6.1.2

Hi!

Is it possible to add a button next to one characteristic?
For example there are 4 characteristics in this product, one of them is color.
What i want, is to add a button that opens a PDF file next to it with details of the colors.

Thank you

- [ ![BUTTON.png](/forum/attachment/63301) ](/forum/attachment/63301 "BUTTON.png") [ ](/forum/attachment/63301?download=1 "BUTTON.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA2ODEtYWRkLWJ1dHRvbi1uZXh0LXRvLWEtY2hhcmFjdGVyaXN0aWM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

3 months 3 weeks ago [\#372674](#372674) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add button next to a characteristic](/forum/26-product-category-display/910681-add-button-next-to-a-characteristic#372674 "-- HikaShop version -- : 6.5.1 -- Joomla version -- : 6.1.2  Hi!  Is it possible to add a button next to one characteristic? For example there are 4 characteristics in this product, one of them is color. What i want, is to add a button that opens a PDF file next to it with details of the colors.  Thank you")*

Hi,

Yes, this is possible with a view override, which is the clean way since it survives HikaShop updates.

In the backend go to Display &gt; Views, filter the frontend views, and create an override of the "product / show_block_characteristic" view. In that file, find this line:
Code:

$main_html .= '&lt;td&gt;'.$html.'&lt;/td&gt;&lt;/tr&gt;';

and add, just before it:
Code:

if($characteristic_id == 4) { $html .= ' &lt;a class="hikashop_color_pdf" href="YOUR_PDF_URL" target="_blank" rel="noopener"&gt;'.hikashop_translate('Δείτε τα χρώματα').'&lt;/a&gt;'; }

Replace YOUR_PDF_URL with the address of your uploaded PDF, and the label with the text you want on the button.

The 4 is the id of your "Χρώμα" characteristic (I checked it on your metal bed product). Characteristics are global in HikaShop, so keying on that id makes the button appear next to the color dropdown on every product that uses that characteristic. If you later want it on another characteristic as well, just add its id, for example if($characteristic_id == 4 &#124;&#124; $characteristic_id == 59).

To make it look like a real button instead of a plain link, add a little CSS for the hikashop_color_pdf class in your template.

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA2ODEtYWRkLWJ1dHRvbi1uZXh0LXRvLWEtY2hhcmFjdGVyaXN0aWM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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.052 seconds

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