Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Shipping Based on Weight Limits...


johnnymke

Recommended Posts

I have been going nuts trying to get this contrib. to actually work...

 

Supposedly, it will not offer free shipping if the order weighs more than indicated...

 

http://www.oscommerce.com/community/contributions,146

 

  function quote($method = '') {
     global $order, $cart, $shipping_weight;

     $dest_country = $order->delivery['country']['id'];
     $currency = $order->info['currency'];

     if ($shipping_weight > MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX) $this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_TO_HEIGHT . ' (' . $shipping_weight . ') ' . MODULE_SHIPPING_FREEAMOUNT_TEXT_UNIT;
     if ($cart->show_total() < MODULE_SHIPPING_FREEAMOUNT_AMOUNT) {
       if (MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'False') return;
       else $this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR;
     } else

      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY,
                                                     'cost' => MODULE_SHIPPING_FREEAMOUNT_COST)));

 

I thought my problem was solved here:

 

http://www.oscommerce.com/forums/index.php?act...=12&t=99818

 

My question is this...

 

Free Shipping for Zero Weight uses:

 if ($total_weight == 0)

 

I changed this to

 if ($total_weight <= MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX)

 

 

Whereas freeamount.php uses

global $order, $cart, $shipping_weight;

 

Either way, it doesnt work!

 

Thanks-

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...