Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unallowed Shipment Contribution Help


twhite9191

Recommended Posts

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

 

I have been working with the unallowed payment contribution and trying to convert it so it works as an unallowed shipment method. I am having trouble with the function which calls it in the checkout shipping- Here is what I have;

 

  function tep_get_shipping_unallowed ($pay_check) {   

  

  $shipping = tep_db_query("select products_shipping_unallowed from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

     $shipping_not_allowed = tep_db_fetch_array($shipping);

  $shipping_unallowed = explode (",",$shipping_not_allowed['products_shipping_unallowed']);

  $clearance = (!in_array ($pay_check, $shipping_unallowed)) ?  true : false;

  return $clearance;

  }

 

and here is what I have in all my shipping modules

 

    if ( tep_get_shipping_unallowed($this->code) ) {

  $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);

}

 

In all the others I have it changed to their respect name ie. MODULE_SHIPPING_FEDEX_STATUS...

 

In my database I have in the table Products table products_shipping_unallowed and in it I have the data; ups,usps -etc.

 

The problem I am having is that all the payment methods still show up.

 

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...