Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

zero weight free shipping HELP!


maxtors

Recommended Posts

I have the zero weight free shipping contribution and i have modified it and use it for store pickup. I have in the description a large warning that the item is for store pickup only and i also have it in checkout shipping but i guess well alot of people cant read. And still check out. How can disable shipping and payment if there not in NEW YORK for these 0 weight items only? will something like this work? or if someone has a better idea on how to solve this problem.

 

//BEGIN Free Shipping
   if (($cart->show_weight() == 0) ) {
  $free_shipping = true;
  include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
   }
} elseif ($order->delivery['country_id'] == STORE_COUNTRY && $order->delivery['state'] == "New York"){
 $free_shipping = true;
}
else
{
$allow_shipping = false;
}
//END Free Shipping

Link to comment
Share on other sites

modify check function in that form:

function check(){
/*standard code*/
}

to

function check(){
global $order;
if ($order->delivery['country_id'] == STORE_COUNTRY && $order->delivery['state'] == "New York"){
/*standard code*/
} else {
$this->enabled = false;
}
}

Link to comment
Share on other sites

You need to implement my code into shipping module file.

This will disable module when someone will try to buy products and delivery address will different then new york (sorry for eglish).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...