News:

Looking for documentation? Take a look on our wiki

Main Menu

Open productdetails page in lightbox

Started by dmerkenhof, August 02, 2012, 08:48:12 AM

Previous topic - Next topic

dmerkenhof

Hi,

I have a Joomla 2.5 installation with Virtuemart 2.
I am trying to open the product details page in to a lightbox window.
I got as far as opening the productdetails page in a lightbox by editing the productdetails link in de category overview page, BUT..
When I let the lightbox treat the link as an internal link and I click on the "add to cart" button the entire website will be loaded into the lightbox when loading the "cart page".
When I let the lightbox treat the link as an external (or not defined type) link and I click on the "add to cart" button the lightbox disappears (as I want it to work) and load the "cart page", but this time the product won't be added to the cart unfortunately.

Is there a proper way to show productdetails pages in a lightbox without messing up all the code and work properly without bugs?

dmerkenhof

I solved this specific issue myself already.
I found the following code in /components/com_virtuemart/controllers/cart.php on line 85:
$mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'));
And I changed it to:
$mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart&tmpl=component'));
Now only the cart will be opened when I add products to the cart.