Add to cart as a link - enhanced

Please post any feature requests here

Add to cart as a link - enhanced

Postby » Tue Nov 27, 2012 8:50 am

As long as AWCOUPON can be used with VirtueMart, may be you will allow something like:
where cid=1 is the awocoupon id (or code as you like)
Posts: 5
Joined: Sun Nov 25, 2012 10:52 am

Re: Add to cart as a link - enhanced

Postby admin » Fri Nov 30, 2012 10:57 am

Hello, i am afraid that automatic coupopn assignment would not be used by many customers. If you want a coupon to be automatically added, you can add it in any enabled system plugin in:
Code: Select all
function onAfterRoute() {

// you can filter it to VM pages only:
if (JRequest::getCmd('option') == 'com_virtuemart')
// will get autocoupon=1 from the url
$x = JRequest::getVar('autocoupon', 0);
if ($x)
  // if you want a particular coupon, you'd have to query it by
  // $dbj=JFactory::getDBO(); $q = 'select coupon_code from #__something where id = '.(int)$someid..... $db->setQuery($q); $cc = $db->loadResult();
   if (empty($_SESSION['coupon_code']))
    $_SESSION['coupon_code'] = 'your awo coupon code';

// thus it will automatically be used in the cart

The code is no way complete and may contain errors.

You can download my currency plugin, which redirects the old checkout.index page to OPC's shop.cart page and add it there.

Best Regards,
Site Admin
Posts: 2629
Joined: Wed Jan 06, 2010 11:43 pm

Return to Feature Request