Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Free Ground Shipping Mod

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 12-03-2008, 11:42 AM
 
nacredata nacredata is offline
 

Member
  
Join Date: Jul 2008
Location: Chapel Hill, NC
Posts: 10
 

Default Re: Free Ground Shipping Mod

The following pair of simple hacks seem to work for me (4.1.11)

in /modules/Special_Offers/func.php around line 1330:
Code:
# Part 2: Apply bonuses # $discount = 0.00; $_SESSION['ND_freeshipping'] = NULL; # Apply discount bonus foreach ($products as $pk=>$product) { if (@$product["deleted"]) continue; # for Advanced_Order_Management module if (!empty($apply_bonus[$pk])) { $bonus = $apply_bonus[$pk]; if ($bonus['discount'] > 0.00) { if ($config["Taxes"]["display_taxed_order_totals"] =="Y") $products[$pk]['saved_original_price'] = $products[$pk]['taxed_price']; else $products[$pk]['saved_original_price'] = $products[$pk]['price']; $products[$pk]['price'] -= $bonus['discount']; $products[$pk]['special_price_used'] = true; } if ($bonus['free_shipping']) { // NacreData L.L.C. info@nacredata.com // Need to offer free shipping only on UPS ground, not on all delivery methods // so rather than just mark it all free here, rather set a flag which we can // check later (see /shipping/mod_UPS.php around line 551) // $products[$pk]['free_shipping'] = 'Y'; // $products[$pk]['free_shipping_used'] = true; $_SESSION['ND_freeshipping'] = true; } } }


in /shipping/mod_UPS.php around line 550:

Code:
// NacreData L.L.C. info@nacredata.com // Need to offer free shipping only on UPS ground, not on all delivery methods // so rather than just mark it all free in /modules/Special_Offers/func.php // (around line 1353), rather set a flag there which we can check here // is ground shipping ALWAYS methodid 1?? Appears to come from the database // table xcart_shipping if( isset( $_SESSION['ND_freeshipping'] ) && $subcode == 1 ) { $data = '0.00'; } $_rate_data = array( "methodid"=>$subcode, "rate"=>$data, "currency"=>$mod_UPS_currency, "orig_rate"=>$orig_rate, "warning"=>$RatedShipmentWarning, "service_code"=>$sv["service_code"] );

Also note something we discovered: it seems all items need to have a weight assigned to them. Items without a weight may not trigger a shipping recalculation.
__________________
Devin M. Ceartas
NacreData L.L.C.

X-Cart Gold v4.1.11
Modules: X-Affiliate
Reply With Quote
  #12  
Old 01-10-2009, 05:52 PM
 
murlyn28 murlyn28 is offline
 

Newbie
  
Join Date: Aug 2007
Posts: 7
 

Default Re: Free Ground Shipping Mod

Quote:
Originally Posted by nacredata
The following pair of simple hacks seem to work for me (4.1.11)

in /modules/Special_Offers/func.php around line 1330:

Also note something we discovered: it seems all items need to have a weight assigned to them. Items without a weight may not trigger a shipping recalculation.


I can't seem to get any International orders to pass the UPS address verification using this mod.
__________________
xcart 4.4.4 [linux]
Reply With Quote
  #13  
Old 07-10-2009, 03:44 PM
 
steewu steewu is offline
 

Member
  
Join Date: Sep 2007
Posts: 26
 

Default Re: Free Ground Shipping Mod

Is there a new version for 4.2.2... I'm having problem set it up...
__________________
Version Xcart5 5.2.XX
Reply With Quote
  #14  
Old 11-03-2009, 08:58 AM
 
RPS RPS is offline
 

Advanced Member
  
Join Date: Apr 2007
Posts: 35
 

Default Re: Free Ground Shipping Mod

nacredata,

I tried using your mod on 4.1.7 but wasn't able to get anywhere with it. Everything is added, but the price is still the same for all UPS options.

I verified within the database that the subcode is 1 for UPS Ground. Any suggestions?
__________________
X-Cart version 4.0.16 , 4.1.5, 4.1.7, 4.3.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:49 AM.

   

 
X-Cart forums © 2001-2020