Use OpenBox to show additonal information on the product page

  • Posts: 98
  • Thank you received: 7
  • Hikashop Business
6 years 1 month ago #303059

-- url of the page with the problem -- : www.2-rad-schwede.de
-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.2
-- PHP version -- : 7.0.16
-- Browser(s) name and version -- : mozilla latest version

Hi
To provide some additional information to the customer on the product page (e.g. for financing background information) I wanted to use your OpenBox functionality (from the checkout).
Due to the fact that we have, depending on the product type, different partners I created a new customer field (singe dropdown) and in the titles I tried to put the HTML code.
a href="index.php/service/rahmenhoehe-rechner?tmpl=component" rel="nofollow" onclick="return window.hikashop.openBox(this);" data-hk-popup="vex" data-vex="{x:450, y:480}">Rahmenhöhe-Beratung /a
The problem is that ONCLICK will not but stored in the title field so that a complete new page is loaded instead of show the OpenBox.
Any idea how to solve it? Is there an easier solution to do so?

Thanks in advance
Markus

Attachments:

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

  • Posts: 83486
  • Thank you received: 13507
  • MODERATOR
6 years 1 month ago #303086

Hi,

The onclick attribute is reserved as it is already used by the custom field system for the "display limited to" setting of the custom fields.
So you can't add it to the attributes setting of the custom field.
Alternatively, you could hook your javascript from somewhere else:
stackoverflow.com/questions/6348494/addeventlistener-vs-onclick
You could thus add your javascript code in a view override, through a plugin, in your template, etc.

The following user(s) said Thank You: Markus Schnier

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

  • Posts: 98
  • Thank you received: 7
  • Hikashop Business
6 years 1 month ago #303552

Hi Nicolas,

thanks for the details and the background. I solved it by using the modal plugin.

That works great

best regards
Markus

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

Time to create page: 0.074 seconds
Powered by Kunena Forum