Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

disable shipping on specific items


Guest

Recommended Posts

I need to disable shipping on items that have a specific attribute assigned to them. I do NOT wish to use the fix for this by assigning these products as download items, because it wont work for me.... Has anyone successfully implemented this into their store? I need some help, and it seems like if I could just put a simple javascript in somewhere to say:

If product_attribute = noshipping

then "dont display shipping options"

 

Any help is greatly appreciated!

Thanks in advance...

Link to comment
Share on other sites

I need to disable shipping on items that have a specific attribute assigned to them.  I do NOT wish to use the fix for this by assigning these products as download items, because it wont work for me.... Has anyone successfully implemented this into their store?  I need some help, and it seems like if I could just put a simple javascript in somewhere to say:

If product_attribute = noshipping

then "dont display shipping options"

 

Any help is greatly appreciated!

Thanks in advance...

 

I have been looking at this. So far I have not found a clean single point fix.. I was told that setting the product weight to zero would fix this however that does not seem to work. You mentioned that assigning the product as a downloadable item would eliminate shipping. How do you do that? If this is effective, we may be able to trace the code and see how it is done there.

 

Otherwise a method that I am looking at would be to redirect the user around checkout_shipping.php. I still have some redirection issues related code like this in checkout_payment.php

 

// if no shipping method has been selected, redirect the customer to the shipping method selection page

if (!tep_session_is_registered('shipping')) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

}

Link to comment
Share on other sites

I found this code in check_shipping.php it might be helpful

 

// if the order contains only virtual products, forward the customer to the billing page as

// a shipping address is not needed

if ($order->content_type == 'virtual') {

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

$shipping = false;

if (!tep_session_is_registered('sendto')) tep_session_register('sendto');

$sendto = false;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

}

Link to comment
Share on other sites

I found this code in check_shipping.php it might be helpful

 

// if the order contains only virtual products, forward the customer to the billing page as

// a shipping address is not needed

  if ($order->content_type == 'virtual') {

    if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

    $shipping = false;

    if (!tep_session_is_registered('sendto')) tep_session_register('sendto');

    $sendto = false;

    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

  }

 

the above code is in checkout_shipping_address

Link to comment
Share on other sites

In checkout_shipping.php find:

 

$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
$free_shipping = true;
include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
} else {
? ?$free_shipping = false;
?}

 

and change to:

 

$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
$free_shipping = true;
include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
if ?($total_weight == 0)
{
$free_shipping = true;
}
} else {
? ?$free_shipping = false;
}

 

for weight set to zero items.

Your online success is Paramount.

Link to comment
Share on other sites

This code is found on line 50 of checkout_shipping.php. When the if statement is true the globals: $shipping and $sendto are set to false and the customer is sent to the billing page. This shuts down all shipping information on the order.

 

// if the order contains only virtual products, forward the customer to the billing page as

// a shipping address is not needed

if ($order->content_type == 'virtual') {

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

$shipping = false;

$sendto = false;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...