- Posts: 17
- Thank you received: 0
add custom iframe to product page below wish list
10 years 5 months ago #242444
by cajsoft
add custom iframe to product page below wish list was created by cajsoft
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3
-- PHP version -- : 5
-- Browser(s) name and version -- : ie11
Hi,
I've been struggling to figure out how to add a button or link below the "Add to Wishlist" button on the Product page that can contain an iframe?
is this possible?
Regards,
Craig.
-- Joomla version -- : 3
-- PHP version -- : 5
-- Browser(s) name and version -- : ie11
Hi,
I've been struggling to figure out how to add a button or link below the "Add to Wishlist" button on the Product page that can contain an iframe?
is this possible?
Regards,
Craig.
Please Log in or Create an account to join the conversation.
10 years 5 months ago #242448
by nicolas
Replied by nicolas on topic add custom iframe to product page below wish list
Hi,
You would have to add such code:
after the code:
in the file "quantity" via the menu Display>Views
You would have to add such code:
Code:
echo 'my iframe HTML code';
Code:
echo '<div id="hikashop_add_wishlist">' .
$this->cart->displayButton(JText::_('ADD_TO_WISHLIST'), 'add', $this->params, $url, $wishlistAjax, '', @$this->row->product_max_per_order, 1, '', false) .
'</div>';
Please Log in or Create an account to join the conversation.
10 years 4 months ago #244915
by cajsoft
Replied by cajsoft on topic add custom iframe to product page below wish list
hi,
I've added the IFRAME code to the quantity view and the FRAME now shows below the Wishlist which is what I want, however, the JBUTTON you mentioned, once I add this it just shows another "Add to wishlist" button below the IFRAME.
What I require is that the IFRAME is hidden until the Button is clicked.
I've added the IFRAME code to the quantity view and the FRAME now shows below the Wishlist which is what I want, however, the JBUTTON you mentioned, once I add this it just shows another "Add to wishlist" button below the IFRAME.
What I require is that the IFRAME is hidden until the Button is clicked.
Please Log in or Create an account to join the conversation.
10 years 4 months ago #244924
by nicolas
Replied by nicolas on topic add custom iframe to product page below wish list
Hi,
I didn't say that you should add the code:
It was just an indication of where to put the code of your iframe.
If you want the iframe to be hidden until you click on the add to wishlist button, you need to add an id in your iframe and add CSS code to hide it by default:
Then, before the code of the add to wishlist button, you need to prepend to the variable $wishlistAjax some javascript code to display the iframe. Something like that:
I didn't say that you should add the code:
Code:
echo '<div id="hikashop_add_wishlist">' .
$this->cart->displayButton(JText::_('ADD_TO_WISHLIST'), 'add', $this->params, $url, $wishlistAjax, '', @$this->row->product_max_per_order, 1, '', false) .
'</div>';
If you want the iframe to be hidden until you click on the add to wishlist button, you need to add an id in your iframe and add CSS code to hide it by default:
Code:
#my_iframe_id{ display: none; }
Code:
$wishlistAjax = 'document.getElementById(\'my_iframe_id\').style.display = \'block\''. $wishlistAjax;
Please Log in or Create an account to join the conversation.
10 years 4 months ago #244993
by cajsoft
Replied by cajsoft on topic add custom iframe to product page below wish list
thanks.
I understand what you are saying, however I dont want ot use the WISHLIST button.. I want a NEW button that when clicked shows the frame.. What I found that is when I click the add to wishlist button, it shows the frame, however the button performs a POST on the page and redirects me to the CART. I dont want this to happen.. all that should happen is when the NEW button is clicked the frame is shown and the POST should not be completed. i.e user stays on same page.
regards,
Craig.
I understand what you are saying, however I dont want ot use the WISHLIST button.. I want a NEW button that when clicked shows the frame.. What I found that is when I click the add to wishlist button, it shows the frame, however the button performs a POST on the page and redirects me to the CART. I dont want this to happen.. all that should happen is when the NEW button is clicked the frame is shown and the POST should not be completed. i.e user stays on same page.
regards,
Craig.
Please Log in or Create an account to join the conversation.
10 years 4 months ago #245018
by nicolas
Replied by nicolas on topic add custom iframe to product page below wish list
Hi,
Then, it's even easier.
Just add your own button like that:
Then, it's even easier.
Just add your own button like that:
Code:
<input type="button" onclick="document.getElementById('my_iframe_id').style.display = 'block';return false;" value="Display iframe" />
Please Log in or Create an account to join the conversation.
Time to create page: 0.062 seconds