VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Shipping Modules => Topic started by: Ram85 on April 17, 2006, 16:01:20 PM

Title: Free Shipping HACK
Post by: Ram85 on April 17, 2006, 16:01:20 PM
Im trying to offer the customer free shipping when a certain coupon code is entered but it doesn't seem to work.  I've tried various combinations but I think my logic is scewed up because it either does free shipping for everyone or no free shipping for everyone no matter what the coupon code is. I need to know how to call the coupon_id as I dont think mine is working right.  Here is the code I added to the top of ps_checkout.php.


$coupon_id = mosGetParam( $_REQUEST, 'coupon_id', null );

if($coupon_id = '1') {
    $PSHOP_SHIPPING_MODULES = Array( "free_shipping" );
    include_once( CLASSPATH. "shipping/free_shipping.php" );
    $this->_SHIPPING =& new free_shipping();
}
Title: Re: Free Shipping HACK
Post by: Andrew on January 17, 2007, 19:47:13 PM
Did you or anyone ever figure this out?
Title: Re: Free Shipping HACK
Post by: Lynette on February 18, 2008, 23:54:55 PM
I'm looking for this solution also

Anyone?