Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 04-01-2012 12:33:19

geraldz
Member
Registered: 09-27-2011
Posts: 251

How to override real-time shipping for large orders?

Our shopping cart uses real-time shipping charges which works great for small orders.  However sometimes we quote large orders to customers and offer them better shipping rates as well.

Here's the problem:  we can issue a discount code for the customer to receive the quoted discount on a large merchandise order (or set them up as a wholesaler).  But how can we override the real-time shipping charges?  It would be nice if we could add a checkout form field called "Enter quoted shipping amount" and have this value used in lieu of the real-time quote system.

Any assistance appreciated!

Offline

 

#2 04-02-2012 11:03:00

jj1987
Member
From: Orlando, FL
Registered: 07-14-2008
Posts: 502
Website

Re: How to override real-time shipping for large orders?

geraldz wrote:

Our shopping cart uses real-time shipping charges which works great for small orders.  However sometimes we quote large orders to customers and offer them better shipping rates as well.

Here's the problem:  we can issue a discount code for the customer to receive the quoted discount on a large merchandise order (or set them up as a wholesaler).  But how can we override the real-time shipping charges?  It would be nice if we could add a checkout form field called "Enter quoted shipping amount" and have this value used in lieu of the real-time quote system.

Any assistance appreciated!

No existing way to do this.



-James Garrett

Offline

 

#3 04-02-2012 15:34:08

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: How to override real-time shipping for large orders?

The problem of having a quoted shipping field in the checkout pages that overrides the shipping is how do you stop anyone from entering anything they want.

John

Offline

 

#4 04-02-2012 17:13:11

geraldz
Member
Registered: 09-27-2011
Posts: 251

Re: How to override real-time shipping for large orders?

"The problem of having a quoted shipping field in the checkout pages that overrides the shipping is how do you stop anyone from entering anything they want."

I guess we would need a "shipping code" that we could generate similar to discount codes.  The customer inputs the code and it overrides the real-time quote.

Offline

 

#5 04-02-2012 17:28:47

sppars
Member
Registered: 01-25-2006
Posts: 301

Re: How to override real-time shipping for large orders?

We had a similar issue. The way we handled it was we determined the "better shipping rate" tended to be a standard percentage of the real time rates. With that percentage in hand we've written a custom shipping script that gets the real time rates and when the order meets the criteria for a "large order", deducts that percentage from the real time ground rate. At check-out the customer is provided with the discounted rate along with the regular ground rate and expedited rates.

Offline

 

#6 04-24-2012 02:55:26

polarize
Member
Registered: 11-15-2004
Posts: 293

Re: How to override real-time shipping for large orders?

Do you have an example custom script of how to discount the shipping rates for a large order?


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#7 04-24-2012 12:26:17

sppars
Member
Registered: 01-25-2006
Posts: 301

Re: How to override real-time shipping for large orders?

This is a script for CCP6, but the idea would be the same:

Code:

<?php 

$app = $this->globals('khxc.app');

$info = $this->globals('ecom.customship');

$cart = $this->globals('ecom.cart_contents');

$free_ship = 1500.00;

if ($info['weight'] > 1000) {$freight_discount = 0.70;}
elseif ($info['weight'] > 500) {$freight_discount = 0.75;}
elseif ($info['weight'] > 250) {$freight_discount = 0.80;}
else {$freight_discount = 0.85;}

$delinfo = array('stateprov'     => $info['stateprov'],
                 'country'       => $info['country'],
                 'postalcode'    => $info['postalcode'],
                 'rescom'        => $info['rescom'],
                 'shipstateprov' => $info['shipstateprov'],
                 'shipcountry'   => $info['shipcountry'],
                 'shipzip'       => $info['shipzip'],
                 'shipmethods'   => 'UPSTOOLS', //UPSTOOLS, FEDEX
                 'shiptype'      => 'R');
      
$result = $this->include_namespace($app,'shiprealtime',array('delinfo'  => $delinfo, 'packages' => $info['packages']));

// +--
// | Return results with handling fee and surcharge.
// +--    

foreach ($result as $num => $service) {

     if (($info['stateprov'] != 'Alaska') && ($info['stateprov'] != 'Hawaii') && ($info['country'] == 'United States') && ($info['total'] > $free_ship)) {

     $custom['Standard Motor Freight'] = '0.00';}

     elseif (($service['name'] == 'UPS Ground' || $service['name'] == 'FedEx Ground Service') && ($info['country'] == 'United States') && ($info['weight'] > 125)) {

     $custom['Standard Motor Freight'] = $service['amount'] * $freight_discount;}

     $custom[$service['name']] = $service['amount'];
     
     }

$this->globals('ecom.customship_response',$custom);

?>

Our criteria for a large order is triggered by the weight total in the script above but you can select something else. Hope this helps and gives you an idea of an option to explore.

Offline

 

Board footer