Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Customers limited to making purchases...
Customers limited to making purchases in a certain time frame
Re: Customers limited to making purchases in a certain time frame
Hi Edensan,
that's a good question. It really depends on exactly how you want the shop to act when it's not "open for business". Should the products be visible at all? Should they be visible but no "add to cart" functions? Or just remove all links to cart and checkout? Maybe you also want some sort of banner appearing telling people that the shop is closed.
Can you describe in more detail how you want the "closed shop" to act?
Regards,
Stephen
Re: Customers limited to making purchases in a certain time frame
hi stephen,
thy for look into it!
i would love the idea of showing the products only
but a simple page sorry we are closed from monday 800 till Friday 1400 is fit for the job also.
key thing is in that timeframe no orders are made.
greetz Edensan
Re: Customers limited to making purchases in a certain time frame
Hi Edwin,
I'm just doing some testing to see if Chameleon is able to force VM into catalog mode. If it can do this then it's an easy setup. Stand by...
Re: Customers limited to making purchases in a certain time frame
Ok, here's how to force VM into Catalog mode as a result of a Chameleon rule succeeding. This is clever! Note that this cannot work in MetaMod, only in Chameleon.
Put this into the PHP box in the Succeed Action in a rule:
if (!class_exists( 'VmConfig' )) require(JPATH_ROOT.'/administrator/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();
$rProperty = new ReflectionProperty("VmConfig", '_jpConfig');
$rProperty->setAccessible(true);
$config = $rProperty->getValue();
$config->_params['use_as_catalog'] = 1;
Of course, the rest of the rule needs to be detecting the right time span as well. So you could use the following PHP in the PHP box on the main tab (not the one in the Succeed action) :
if ($core_genius->inTimeSpan("fri 14:00 - mon 08:00")) return false; // rule fails during these times, hence not in catalog mode
else return true; // rule succeeds outside of those times, hence set to catalog mode
So put those 2 sets of things into 1 Chameleon rule, name it, save it, and hey presto you have Catalog mode enabled when not between fri 14:00 and mon 08:00.
Best regards,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Customers limited to making purchases...
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:
- 1
- Guests Online:
- 126
- Online:
- uistr4qx
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked