News:

Support the VirtueMart project and become a member

Main Menu

Optional products (self-provided fields) target of link

Started by Flip da Script, December 08, 2015, 12:27:52 PM

Previous topic - Next topic

Flip da Script

Hello,

how can i modify the function 'Optional products' in the area self-provided fields in this way, that the lightbox not open in a new window (_blank),
I would like to open the optional product in the same window (_self).

Thanks in advance to everybody who can help.

Regards
Flip




Optionale Produkte (selbsterstellte Felder)

Hallo Zusammen,

wie kann ich die Funktion 'Optionale Produkte' in den selbsterstellten Feldern so modifizieren, das beim Klick auf das selbige in der Lightbox, klein neues Fenster (_blank) geöffnet wird, sondern das Optionale Produkt im gleichen Fenster (_self) geöffnet wird.

Wäre vielleicht auch zukünftig eine sinnvolle, auswählbare Option in den Basiseinstellungen des selbsterstellten Feldes.

Vielen Dank vorab.

Grüße
Flip

System: Joomla 3.4.5 / VM 3.0.12

Milbo

I assume you mean the related products.
In general you can do this by overriding the sublayout for the "optional products", http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html

So the file related.php handles the related products. The line 9 has

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'));


Just change the 'target'=>'_blank' to _self
http://www.w3schools.com/tags/att_link_target.asp
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/