Page 1 of 1
Opening link in NEW PAGE or TAB
Posted: Fri Mar 10, 2017 12:46 am
by danscustomworks
I am setting up my store and want to have customers be able to click on an image or link and have that open in a separate tab or page. Is there a way to do that in Opencart?
Re: Opening link in NEW PAGE or TAB
Posted: Fri Mar 10, 2017 4:00 am
by drebosio
This is easy to do, but where are the images going to be at?
All you need to do is set the link of the image which can be done in the html
Re: Opening link in NEW PAGE or TAB
Posted: Fri Mar 10, 2017 4:25 am
by danscustomworks
I have an image I will put in the slideshow at the top of my page then link it to the new destination but how do I have it open in a new page so that they are both viewable by the person looking. I'm not super with HTML so that is why I am asking. Also having a few issues with setting up a multi store and the images not showing up on the other stores.
Re: Opening link in NEW PAGE or TAB
Posted: Fri Mar 10, 2017 5:49 pm
by paulfeakins
Re: Opening link in NEW PAGE or TAB
Posted: Fri Mar 10, 2017 9:07 pm
by uksitebuilder
As this is for the slideshow, I am assuming you will be using the admin - Design - Banners section to add your images and links
The only way to make a link open in a new window using that method would be to add the link as follows:
Code: Select all
javascript:void(window.open('http://www.opencart.com','window_name'));
Re: Opening link in NEW PAGE or TAB
Posted: Sat Mar 11, 2017 1:46 pm
by kashmir kkit
a simple way is putting your link with target e.g
<a href="link here" target="_blank">
Re: Opening link in NEW PAGE or TAB
Posted: Sat Mar 11, 2017 4:34 pm
by uksitebuilder
You cannot put a href in the design banners section link field, hence my post above using javascript
Re: Opening link in NEW PAGE or TAB
Posted: Sat Mar 11, 2017 11:49 pm
by cyclops12
What OC version are you using ?
Re: Opening link in NEW PAGE or TAB
Posted: Mon Mar 13, 2017 4:03 am
by danscustomworks
2.0.3.1
Re: Opening link in NEW PAGE or TAB
Posted: Mon Mar 13, 2017 5:41 pm
by kashmir kkit
@uksitebuilder... oh actually i skipped to see it is related to design banner module....

Re: Opening link in NEW PAGE or TAB
Posted: Tue Mar 14, 2017 3:18 am
by cyclops12
Re: Opening link in NEW PAGE or TAB
Posted: Tue Mar 14, 2017 4:05 am
by uksitebuilder
If you are going to make a mod for something that was answered a few posts back, you could at least have added a switch in admin to toggle new window or not. Now all slideshow links will open in new tabs
Re: Opening link in NEW PAGE or TAB
Posted: Tue Mar 14, 2017 5:27 am
by cyclops12
uksitebuilder wrote: ↑Tue Mar 14, 2017 4:05 am
Now all slideshow links will open in new tabs
My bad, I didn't realise the OP only wanted one image to open in new tab
uksitebuilder wrote: ↑Tue Mar 14, 2017 4:05 am
If you are going to make a mod for something that was answered a few posts back, you could at least have added a switch in admin to toggle new window or not.
Hmm something to think about

Re: Opening link in NEW PAGE or TAB
Posted: Fri Aug 17, 2018 5:11 am
by redafawzy201
uksitebuilder wrote: ↑Fri Mar 10, 2017 9:07 pm
As this is for the slideshow, I am assuming you will be using the admin - Design - Banners section to add your images and links
The only way to make a link open in a new window using that method would be to add the link as follows:
Code: Select all
javascript:void(window.open('http://www.opencart.com','window_name'));
where I put this code or add every link with this code
Re: Opening link in NEW PAGE or TAB
Posted: Fri Aug 17, 2018 5:15 am
by redafawzy201
I need out link open at my web fram