Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » VirtueMart shopping cart recipe
Page:
1
VirtueMart shopping cart recipe
Re: VirtueMart shopping cart recipe
HI Marius,
as it happens, I have been doing some VM work recently that will eventually make it into MetaMod and make it much easier to achieve this...
Meanwhile, I think this will do what you want:
Code:
$cart = @$_SESSION['cart'];
if ($cart == null or @$cart["idx"] == 0) {
return XXX; // replace XXX with shopping cart module id
}
Bear in mind though, that with VM you can usually add items to the cart without doing a page refresh. (it adds via ajax). So without a page refresh, this code will not be run, and there won't be a shopping cart module on the page even though there may be products in the cart, until the page is refreshed somehow.
Just something to watch out for...
Cheers,
Stephen
Administrator has disabled public posting
Page:
1
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » VirtueMart shopping cart recipe
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7660
- Newest User:
- marino9885
- Members Online:
- 0
- Guests Online:
- 129
- 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