Button that opens article view in a new window

  • Posts: 634
  • Thank you received: 16
11 years 6 months ago #102197

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 6 months ago #102226

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:

<a href="<?php echo hikashop_currentUrl(); ?>" target="_blank">Your link</a>

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 11 years 6 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.056 seconds
Powered by Kunena Forum