Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod Favourite Recipes
- » How to control the checkout stages -...
How to control the checkout stages - steps
How to control the checkout stages - steps
Hello pros. I use the vm 3 and the medamod to display a 4 difrent modules to every of the 4 checkout steps and i use the pagetype cart, cart.editshipment, and cart.editpayment - e.g.
$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype = cart.editshipment" ) ) return 157;
In the 3 steps everything success. Bat to 4 step means the final confirm page and the thankyou page to,(cart.thankyou, checkout.result) return again the first step module means pagetype cart. And no one of your pagetype examples is working there.
Can any one help with the 2 final steps medamod code ?
Thank you.
Re: How to control the checkout stages - steps
Hi geoele,
Happy New Year from New Zealand
I've just run through Joomla 3.4.3 and VM 3.0.9 and looked at the different page types that JomGenius reports:
cart
user.editshipto
user.editbillto
I found that it's extremely hard to find out when VM is on the "thank you" page. After a couple of hours on this I found a way to do it. It's a bit of a hack but works on my setup at least.
Try this in MetaMod:
if (class_exists("VirtueMartCart")) {
$cart = VirtueMartCart::getCart();
if ($view == 'cart' and $cart->lists == null) echo "On Thank You page";
}
I can't find any occasions where this triggers on the wrong page but YMMV.
So it looks like the original method used to determine the "checkout.thankyou" page has failed due to a recent VM change. If you can confirm that the above method works for you, I can look at including that in the JomGenius code.
Thanks,
Stephen
- Index
- » MetaMod
- » MetaMod Favourite Recipes
- » How to control the checkout stages -...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7628
- Newest User:
- horlogekorting34
- Members Online:
- 0
- Guests Online:
- 102
- 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