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 01-22-2013 11:16:14

sealette
Member
Registered: 10-29-2010
Posts: 65

Adding Pick Up to UPS shipping options

I currently only use UPS as the shipper, but need to add a local pick up option that won't add a shipping charge. What's the best way to do this?

Thanks,

Offline

 

#2 01-23-2013 09:25:19

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Adding Pick Up to UPS shipping options

(1) In admin under Store > Shipping > Custom Shipping Methods, choose to add a new custom shipping method.  Use 'upswithpickup' as the 'Identifier', 'UPS With Pickup' as the 'Display Name' and enter the following for the 'Shipping Method PHP Content':

Code:

<?php 

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

$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',
                 'shiptype'      => 'R');

$result = $this->include_namespace('ecom','shiprealtime',array('delinfo'  => $delinfo,
                                                               'packages' => $info['packages']));

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

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

} // End of foreach statement.

$custom['Local Pickup'] = '0.00';

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

?>

(2) Access System > Database > Raw Database Admin and choose to submit a Raw SQL Statement.  Submit this statement:

Code:

UPDATE ecom_prod SET delmethod='C', customship='upswithpickup' WHERE delmethod='R'

This will add a custom shipping script that uses UPS realtime rates with a local pickup option, and assign all of your realtime shipped products to that custom script.


Nick Hendler

Offline

 

#3 01-24-2013 09:56:30

sealette
Member
Registered: 10-29-2010
Posts: 65

Re: Adding Pick Up to UPS shipping options

I did that and it did not work. It did not add the local pick up option and instead of using real time pricing it used the method based pricing, which the database forces you to put in a number, even if you're using the real time shipping quotes.

So how do I fix that?

Offline

 

#4 01-24-2013 10:54:50

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

Re: Adding Pick Up to UPS shipping options

Their are discussions for both methods of doing this in the forum, they may deal with v7 but both will work with v8.

John

Offline

 

#5 01-25-2013 07:48:39

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Adding Pick Up to UPS shipping options

The code I posted works.  Please be aware you'll need to clear your cart and re-add items to it after making the change to see the new script and product parameters working.


Nick Hendler

Offline

 

#6 01-25-2013 15:18:38

sealette
Member
Registered: 10-29-2010
Posts: 65

Re: Adding Pick Up to UPS shipping options

I did clear the cart and restart, and it made a change - it used applied the product based shipping price only and did not show the local pick up option. I don't understand why it went to read that code even and not the real shipping proposals.

I would love to get your code to work as it is the most simple to apply compared with other methods I have seen posted...

Offline

 

#7 01-26-2013 10:20:22

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

Re: Adding Pick Up to UPS shipping options

Did you set your products shipping option to custom with the new script selected in the custom shipping method? This would have to be done for every product you want the in-store pickup option to appear.

John

Offline

 

#8 01-28-2013 08:35:03

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Adding Pick Up to UPS shipping options

Did you set your products shipping option to custom with the new script selected in the custom shipping method? This would have to be done for every product you want the in-store pickup option to appear.

This.  That's why I gave you the SQL to do.  Access System > Database > Raw Database Admin and choose to submit a Raw SQL Statement.  Submit this statement:

Code:

UPDATE ecom_prod SET delmethod='C', customship='upswithpickup' WHERE delmethod='R'

Nick Hendler

Offline

 

#9 02-05-2013 12:08:19

sealette
Member
Registered: 10-29-2010
Posts: 65

Re: Adding Pick Up to UPS shipping options

Yes, I have done all of that. The only thing the code gives me is a flat $25.00 delivery charge. It doesn't even give a local pick up or vary for the shipping distance. I think it has to be using the product based shipping number, or else I have no idea where it even got $25.00 from. Any help would be Hugely appreciated.

Offline

 

#10 02-06-2013 09:13:42

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Adding Pick Up to UPS shipping options

It probably got the $25 as the shipping error amount as entered under Store | Component | Settings | Shipping Settings.  If this is the case, you:

(1) Might have an error in your PHP code in your shipping script.
(2) Might not have configured your USPS Connection yet under Store | Shipping.

Or, maybe you're using product based shipping for your products.  Make sure all of your products are set up to use the custom shipping script and custom shipping.


Nick Hendler

Offline

 

#11 02-06-2013 10:54:50

sealette
Member
Registered: 10-29-2010
Posts: 65

Re: Adding Pick Up to UPS shipping options

I just checked and confirmed that the UPS USPS connection is configured and active. I inserted the code exactly as it was given.

I went and put one of the products to product based shipping, and the prices are different, so I have confirmed it is not that.

So, that leaves an error in the php code in my shipping script. I inserted the custom code exactly as it was given above. Is there another place I should check the shipping script?

Offline

 

#12 02-06-2013 13:58:32

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

Re: Adding Pick Up to UPS shipping options

Their are two > in the code that is building the custom array that is causing it to fail, the code should be

Code:

<?php

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

$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',
                          'shiptype'      => 'R');

$result = $this->include_namespace('ecom','shiprealtime', array('delinfo'  => $delinfo, 'packages' => $info['packages']));

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

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

} // End of foreach statement.

$custom['Local Pickup'] = '0.00';

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

?>

John

Offline

 

#13 02-06-2013 15:33:27

sealette
Member
Registered: 10-29-2010
Posts: 65

Re: Adding Pick Up to UPS shipping options

It worked! Thank you!

Offline

 

Board footer