Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hello All,

 

I am currently using the XML module for UPS /w insurance.

 

$Id: upsxml.php,v 1.3.4 2008/02/03 JanZ Exp $

Original copyright © 2003 Torin Walker

 

I got it all working but the part that calculates insurance is using the current total of the sale not the cost of replacing the items shipped.

 

I already added a custom field to the catalog items called product_cost and what I want to do is somehow take all the items in the shopping cart and use their cost to estimate the insurance.

 

When I look at the code of the ups xml module I see the following code.

 

// insurance addition

if (MODULE_SHIPPING_UPSXML_INSURE == 'False') {

$this->pkgvalue = 100;

} else {

$this->pkgvalue = ceil($order->info['subtotal']); // is divided by number of boxes later

}

 

Now I can see here that the value is coming from the ceil($order->info['subtotal']); , which I am guessing is the API interface to the order.. So I guess what I am looking to do here is somehow pull all the items from the cart and their cost that we are paying vs what they are paying. Because if we lose the order, a lot of times the cost is much cheaper for us to replace the item and reship it and we could lower the cost of the insurance if we told UPS how much we wish to insure each item for.

 

any help would be appreciated, =)

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