Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - PureMart (SKU# FLEX-00010)

TOPIC: quicklook add to cart target window, plus template

quicklook add to cart target window, plus template 11 years 2 months ago #2490

Hello,

I have 2 issues with the quicklook popup window:
1) Minor issue : I use 2 templates for my site, one for editorial content ( defaull template), and one for the the shop sections, I have configured the template to menu items and also to component Virtuemart . It is working fine . I have all shop pages, including checout pages associated with the shop template .
However, if I use the quicklook button, the popup window uses the website main template . Is theer a way to force the quicklook popup to use my template associated with Virtuemart instead ?

2 ) .When I open the quicklook window, click the add to cart buton, I get the " your article has been added to your cart " popup, with a link to "go to checkout" . If I go to the checkout page it opens in its parent window, that is the quicklook popup window that is narrower than the main page . Is there a way to get that link to open the checkout page n the main borowser window ?

Thanks
Catherine
The administrator has disabled public write access.

quicklook add to cart target window, plus template 11 years 2 months ago #2518

Hi,

1- Since the quicklook opened with ?tmpl=component
Your joomla template's CSS, manu navigation, module positions etc.. don't get loaded. But this CSS file is loaded though:
ROOT/templates/<yourjoomlatemplate>/html/com_virtuemart/assets/css/flexibleVM2Global.css

So if you want to style something in the quicklook window, open this flecibleVM2Global.css and add a new CSS rule.
For instance, if you want to change the color of links inside the quicklook window, use this CSS rule:
a:link, a:visited {
    color: #647177;
}

Basically take the same CSS rules that is valid for your overall joomla layout and put those CSS rules into flexibleVM2Global.css as well.

Usually Joomla Templates add an extra class TAG to <body> ... </body> when ?tmpl=components you can specifically use that extra body class, so those rules will be valid only if that class is exist. You can use Mozilla Firebug Plugin to determine that extra BODY Class name.

2- The issue you are saying is not a bug. Just, a small modification is necessary. Since it requires a little change in the Virtuemart Core file, instead of providing the whole file.. we want our clients to do this little modification by themselves. So they will see how "small" and "innocent" it is. (because changing Core Virtuemart file is not-secured in most cases.)

open this PHP file:
ROOT/components/com_virtuemart/controllers/cart.php

Look at the 117th and 118th lines
$this->json->msg = '<a class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
$this->json->msg .= '<a class="showcart floatright" href="' . JRoute::_("index.php?option=com_virtuemart&view=cart") . '">' . JText::_('COM_VIRTUEMART_CART_SHOW_MODAL') . '</a>';

You are going to add target="_parent" to those <a hre="..."> element, so basically replace those 2 lines with these:
$this->json->msg = '<a target="_parent" class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
$this->json->msg .= '<a target="_parent" class="showcart floatright" href="' . JRoute::_("index.php?option=com_virtuemart&view=cart") . '">' . JText::_('COM_VIRTUEMART_CART_SHOW_MODAL') . '</a>';

So by little trick, those "continue shopping" and "show cart" links will be opened in PARENT window, instead of lightbox plugin.
The administrator has disabled public write access.
Time to create page: 0.256 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo