Skip to main content

Button that opens article view in a new window

More
13 years 4 months ago #102197 by PeterChain
I need to render a button in the bottom of my product view that it's a SELF-URL of the same article in view but to open it in a new window. My PHP is very basic.

How would be the code so when the page is rendering creates a button that onlick would open the same content in a new window?

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

More
13 years 4 months ago - 13 years 4 months ago #102226 by Jerome
Hi,

You want to open the exact same page ?
You can use the function "hikashop_currentUrl" in order to get the current url of the page, and create a link like that:
Code:
<a href="<?php echo hikashop_currentUrl(); ?>" target="_blank">Your link</a>

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 13 years 4 months ago by Jerome.
The following user(s) said Thank You: PeterChain

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

Time to create page: 0.191 seconds
Powered by Kunena Forum