Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing Delivery Estimate for Small Packets w/ Canada Post Module


Recommended Posts

Posted

Basically, most of my sale are to the US via small packert air and ground. However the displayed estimate for delivery turns alot of customers off ("Up to two weeks" for small packet air, and "2 to 4 weeks" for small packet ground) I would like to change the small packet air response to 5-10 Business days, and the small packet ground to 10-15 business days, or something like that. From looking at the contribution the delivery estimates are returned by Canadapost and I am not really sure how to intercept and change them before displaying.

 

Thanks

Posted

I have found how to do it if anyone cares:

 

At or around line 309 of catalog\includes\modules\shipping\canadapost.php

 

REPLACE:

 

$deliveryDate = substr($resultXML, strpos($resultXML, "<deliveryDate>")+strlen("<deliveryDate>"), strpos($resultXML, "</deliveryDate>")-strlen("<deliveryDate>")-strpos($resultXML, "<deliveryDate>"));

 

WITH:

 

if ($name=='Small Packets Air')

{

$deliveryDate=('US: 5-10 Business Days');

}

else if($name=='Small Packets Surface')

{

$deliveryDate=('US: 7-15 Business Days');

}

else

{

$deliveryDate = substr($resultXML, strpos($resultXML, "<deliveryDate>")+strlen("<deliveryDate>"), strpos($resultXML, "</deliveryDate>")-strlen("<deliveryDate>")-strpos($resultXML, "<deliveryDate>"));

}

 

Wup

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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