Post by ngoalex111 » Sat Sep 19, 2020 12:52 pm

Hi,

Can someone help me figure out how to make it so that products open in a new tab when clicked.
I know I need to add
target="_blank"
but I have no idea where to add it.

OpenCart Ver 3.0.2.0
Website:
https://www.sexygiftswarehouse.com

Newbie

Posts

Joined
Sat Jun 06, 2020 2:50 pm

Post by grgr » Sat Sep 19, 2020 1:00 pm

I'd suggest the template files (xxx.twig).

Which template files is entirely dependent on where you want the new tab to be opened from.

-

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by ngoalex111 » Sat Sep 19, 2020 1:10 pm

I want the product to open in another tab when you click on it from every category page.

Attachments

Screenshot 2020-09-19 150826.jpg

Screenshot 2020-09-19 150826.jpg (132.75 KiB) Viewed 501 times


Newbie

Posts

Joined
Sat Jun 06, 2020 2:50 pm

Post by letxobnav » Sat Sep 19, 2020 1:54 pm

just add it to the:

Code: Select all

<div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
and

Code: Select all

 <h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
in catalog/view/theme/default/template/product/category.twig

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by thekrotek » Sat Sep 19, 2020 3:21 pm

I would highly suggest to NOT do this. Forcing the new tab for every product is a VERY bad design in terms of UI.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by letxobnav » Sat Sep 19, 2020 4:36 pm

I would highly suggest to NOT do this. Forcing the new tab for every product is a VERY bad design in terms of UI.
When you're all grown up and have your own website you can do whatever you want.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by thekrotek » Sat Sep 19, 2020 4:46 pm

letxobnav wrote:
Sat Sep 19, 2020 4:36 pm
When you're all grown up and have your own website you can do whatever you want.
Nobody asked for another lousy comment from you.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by paulfeakins » Mon Sep 21, 2020 7:24 pm

thekrotek wrote:
Sat Sep 19, 2020 3:21 pm
I would highly suggest to NOT do this. Forcing the new tab for every product is a VERY bad design in terms of UI.
I agree, if someone wants a new tab they'll either middle-click, Ctrl+click, or right-click and select "Open in New Tab".

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 85 guests