News:

Support the VirtueMart project and become a member

Main Menu

Related products opening in new window?

Started by Henrik Holm Nielsen, December 22, 2014, 17:29:19 PM

Previous topic - Next topic

Henrik Holm Nielsen

Hi,

Using VM 3.0.2 and J2.5.27/3.3.6

I'm fighting a problem, with Related Products always opening in a new window - at least when showing in the product-details view.
So after not being able to find the reason in my layout overrides etc., I've just tried downloading the VM Full Installer from http://virtuemart.net/downloads only to realize that this do the same thing?

As I could not find any existing product having Related Products configured, I just took "Default Product" and added 2-3 Related Products using "Custom Fields"-tab, and saved the product.

So - could anyone help me with info about which file to edit, to have the Related Products open in same window?

Cheers,
Henrik :)
/Zorroson :)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Billigt og professionelt design af din hjemmeside | Brug for en billig, flot og professionel hjemmeside?

GJC Web Design

maybe components\com_virtuemart\sublayouts\related.php

remove the ,'target'=>'_blank'  maybe

echo JHtml::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id), $thumb   . $related->product_name, array('title' => $related->product_name,'target'=>'_blank'));
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Henrik Holm Nielsen

Touchdown...!!!

I just changed the "_blank" in your suggestion, to "_self", and saved it as a override - works perfectly!

Thanx and I hope you have a merry christmas!

Cheers,
Henrik ;)

Quote from: GJC Web Design on December 22, 2014, 18:50:23 PM
maybe components\com_virtuemart\sublayouts\related.php

remove the ,'target'=>'_blank'  maybe

echo JHtml::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id), $thumb   . $related->product_name, array('title' => $related->product_name,'target'=>'_blank'));

/Zorroson :)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Billigt og professionelt design af din hjemmeside | Brug for en billig, flot og professionel hjemmeside?