Question

I'm using virtuemart on Joomla and I was wondering if it is possible to make a discount depending on the clock. I want to add a 20% discount on sales made from 16.00 through 20.00 avery day.

Thanks in advance

Was it helpful?

Solution

I think there's a possible solution based on an extension called Chameleon. Using Chameleon you can set the VM shopper group on the fly, according to specific conditions.

So perhaps you could set up a special shopper group that has a 20% discount. Then you would make a "rule" in Chameleon that triggers only between 16:00 and 20:00. The "succeed action" in that rule would be to set the shopper group to the new shopper group.

That way, people would be able to see the special prices only during those times. The shopper group switch is not "sticky" i.e. it doesn't permanently assign the person to that shopper group.

Some people use this functionality for setting different pricing for people in different countries (GeoIP), or different domains on their site, so I think it should work fine for time-based things as well. The only issue might be what happens if they have added something to their cart before 20:00 but don't check out in time; but I am sure that could be solved.

www.metamodpro.com/chameleon

OTHER TIPS

Out of the box is not possible to do that. If you doesn't mind to spend some money you may buy a virtuemart plugin called 'quantity plugin' which calculates discount based on quantity and modify it to use time instead of quantity.

Alternatively you may check how the calculation rules works by examining a few files:

  • administrator/com_components/com_virtuemart/controllers/calc.php
  • administrator/com_components/com_virtuemart/models/calc.php
  • administrator/com_components/com_virtuemart/views/calc/view.html.php
  • administrator/com_components/com_virtuemart/tables/calc*.php

Using those files as starting point you could implement your own discount rule.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top