Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » ChameleonLite
- » VirtueMart: Wrong Template loaded in...
VirtueMart: Wrong Template loaded in many cases
VirtueMart: Wrong Template loaded in many cases
Hello
I'm testing the free version of MetaTemplate.
In many cases, the wrong template is loaded in VirtueMart: Click on Add to cart button, lost password link and forgotten username (both in VM Login-Module), update quantity in cart, delete item from cart and many more. VM falls back to the url domain.dd/index.php which then loads the standard template.
There is no problem if I click on a category link or on a product link to go to the detail page or on the link to show the basket.
I use VM 1.1.5 and Joomla! 1.5.21 with the build in SEF enabled. To disable SEF does not help.
The option Front page POST fix is set to on.
That's the code I use:
Code:
$method = strtolower($_SERVER['REQUEST_METHOD']);
$uri = JURI::getInstance();
if ($method == "post" && substr($uri->_uri,-10) == '/index.php'
&& @$_POST['option'] != '') {
$newuri = $uri->_uri . '?option='
. htmlentities(@$_POST['option'],ENT_QUOTES,'UTF-8')
. '&Itemid='
. htmlentities(@$_POST['Itemid'],ENT_QUOTES,'UTF-8');
$uri->parse($newuri);
}
Is this the wrong code and is there a better one? Would the Pro version solve all the problems for sure?
Thank you very much!
Regards
Patrick
30-Oct-10 07:09:27
Re: VirtueMart: Wrong Template loaded in many cases
Hi Pat,
You really shouldn't need to mess with the URI stuff like you are doing above. You should be able to do everything you're wanting to do using the JomGenius methods for VirtueMart - see this page for the full info on JomGenius for VirtueMart: http://www.metamodpro.com/jomgenius/parameters#vmobject
And see this page for PHP recipes/examples for VM: http://www.metamodpro.com/metamod/recip … mart-pages
The last link was written for MetaMod, but all the recipes work just the same for MetaTemplate too. There's just one difference: you need to "return true;" or "return false;" at the end of each rule instead of returning a module id number.
Admittedly the results you're getting seem a bit strange, but please try to use some of the JomGenius-based recipes first and we'll take it from there.
Cheers,
Stephen
- Index
- » Chameleon / ChameleonLite
- » ChameleonLite
- » VirtueMart: Wrong Template loaded in...
Board Info
- Board Stats:
- Total Topics:
- 1700
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 8052
- Newest User:
- maarie443
- Members Online:
- 0
- Guests Online:
- 176
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked