Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't checkout w/out shipping method


zwayne

Recommended Posts

We have two methods of shipping: free if the order is over $1500 and invoiced later if under $1500 (since we can only determine later which carrier is going to be used for palettes, oversized shipments, etc.) I have no shipping modules enabled except for the Free Shipping with Minimum Purchase contrib. OSC wants a shipping method, however, and one cannot checkout if the order is under $1500! Continue just reloads checkout_shipping instead of going to checkout_payment.

 

Any ideas on what I need to modify?

 

(PS - making the products "virtual" is not appropriate.)

Link to comment
Share on other sites

No replies to this post, so here is what I ended up doing in case anyone cares:

 

In checkout_shipping.php

 

    if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {             
     if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {    
       $shipping = $HTTP_POST_VARS['shipping'];

       list($module, $method) = explode('_', $shipping);
       if ( is_object($$module) || ($shipping == 'free_free') ) {
         if ($shipping == 'free_free') {
           $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
           $quote[0]['methods'][0]['cost'] = '0';
         } else {
           $quote = $shipping_modules->quote($method, $module);
         }
         if (isset($quote['error'])) {
           tep_session_unregister('shipping');
         } else {                                                        
           if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
             $shipping = array('id' => $shipping,
                               'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
                               'cost' => $quote[0]['methods'][0]['cost']);

             tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
           }
         }
       } else { 
         tep_session_unregister('shipping');
       }
     }

   // -------------> code added here
        else {
        $quote[0]['methods'][0]['title'] = "Shipping cost to be invoiced";
        $quote[0]['methods'][0]['cost'] = '0';
        $shipping = array('id' => $shipping,
                          'title' => $quote[0]['methods'][0]['title'], 
                          'cost' => $quote[0]['methods'][0]['cost']);         
        tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); 
        }
   // -------------> end of code addition

   } else {     
     $shipping = false;

 

This seems to do the trick; it will still show 0.00 as the shipping cost, but it will be accompanied the 'title' info on the checkout_shipping and checkout_confirmation pages.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...