VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: posvitJason on December 20, 2011, 20:49:52 PM

Title: Menu-item specific modules and virtumart's redirects
Post by: posvitJason on December 20, 2011, 20:49:52 PM
Alright, I'm muddling through the setup process for vm2, and I've encountered a small issue:

I've assigned Virtuemart Default Layout to a menu, then assigned the virtuemart modules to that menu item, so that they would only display on the virtuemart part of the site. However, the links to the cart, and any other redirect that Virtuemart preforms, no longer has the menu item in the URL, so the modules no longer show up.

Is there a way to fix this outside of modifying the code?
Title: Re: Menu-item specific modules and virtumart's redirects
Post by: posvitJason on December 28, 2011, 20:06:37 PM
I don't like replying to myself, but I was sort of hoping for at least some acknowledgement.

Specifically, it seems to occur after adding a product to your cart, when you are given the option to either continue shopping or view your cart. Choosing either of these options takes you away from the menu item that the store is on.
Title: Re: Menu-item specific modules and virtumart's redirects
Post by: PRO on December 28, 2011, 21:19:21 PM
You could create a module position ONLY for vmart


<?php if (JRequest::getVar('option')=='com_virtuemart') { ?>
<div id="positiondiv"><jdoc:include type="modules" name="vmart-position" /></div>
<?php } ?>

http://www.kaizenmediaworks.com/virtuemart-template-and-module-control
Title: Re: Menu-item specific modules and virtumart's redirects
Post by: posvitJason on December 29, 2011, 15:07:02 PM
Thank you. It doesn't solve the problem (my menu doesn't display the correct menu item), but it is a workaround.