Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

I think the solution for this is the MVS contribution. As far as I know it contains an adapted version of UPSXML (HallMarc knows everything about that).

 

Thanks for your support JanZ, I'll check it out.

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

I think the solution for this is the MVS contribution. As far as I know it contains an adapted version of UPSXML (HallMarc knows everything about that).

 

This MVS contri is way to complicated for me to implement. My shop is fitted with numerous contri's and it's a hell of a job to interprid the instructions.

 

Isn't there simple solution to pre-select the UPS shipping option, besides pickup, as the only shipping possibility in checkout as a package is over 1.5 meters long ?

already use ship2pay to link the various shipping and payment options at the moment.

 

Any surgestion is welcome.

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Jan,

 

You have great patience and I commend you. While it's easy to get ticked off by a few post by people that are too lazy to do the work it takes to find the answers they need, there are many more learning from this thread. Your work here and on this module is a big part of this modules success. Your efforts are great appreciated.

 

By the way, it's using my 48x8x6 box now, but I'm not sure what I did. I have been tweaking things ongoing.

 

Hear hear

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Hello,

 

Whenever I go to checkout out my site (www.atelier-salon.com) mozilla prompts me to download checkout_shipping.php? I have USPS and the other UPS contribution installed (only USPS is "installed"). Any suggestions? Thanks!

STUFF TO DO:

-change boxes on left side to desired style

-remove default mini pictures (cartoon ones)

-modify some of the text colors

-change text headings ("Whats new here" etc.)

-add shipping modules

-add credit card module that allows to stay on my site

-remove all or all but 3 of the "new products" at bottom of main screen

-change button styles

-add SSL

-add the products from TIGI

Link to comment
Share on other sites

here is log from email as well (in four emails)

 

Error from cURL: Error [28]: connect() timed out! experienced by customer with id 2 on 2006-12-11 18:28:31

 

UPSXML TimeInTransit Error: : experienced by customer with id 2 on 2006-12-11 18:28:32

 

Error from cURL: Error [7]: experienced by customer with id 2 on 2006-12-11 18:29:33

 

UPSXML Rates Error:

 

Rating and Service

1.0001

 

0

An unknown error occured while attempting to contact the UPS gateway

:

 

Rating and Service

1.0001

 

0

An unknown error occured while attempting to contact the UPS gateway

experienced by customer with id 2 on 2006-12-11 18:29:36

 

 

I do have valid access key, username, and pw as well.

STUFF TO DO:

-change boxes on left side to desired style

-remove default mini pictures (cartoon ones)

-modify some of the text colors

-change text headings ("Whats new here" etc.)

-add shipping modules

-add credit card module that allows to stay on my site

-remove all or all but 3 of the "new products" at bottom of main screen

-change button styles

-add SSL

-add the products from TIGI

Link to comment
Share on other sites

language.basic-syntax.comments

 

Adding contributions and not knowing the simplest things about the computer language used (PHP) will cost you a lot of time and grey hairs. I know lot's of people here say they did it this way, but IMHO it is more cost effective to spend some time reading a beginners book on PHP or PHP and MySQL.

 

 

"Now you tell me, just reached page 51 of this topic...” :'(

 

 

Maybe it was better indeed to read the ‘PHP bible’ instead of this topic for the last 4 days.

Anyhow, still didn't found what I'm looking for.

 

My main interest is to get a (my) shop working properly under all circumstances and afterwards, if there still is time, I'll get my degree in PHP and MySQL. At the moment PHP sounds like Chinese to me and there for I’ll need all of your VERY VERY VALUED help.

 

I also, wondered what this module could do for me besides giving a shipping quote and ‘virtually stuffing it in a pre-defined box’ for me. (NOT unimportant doh)

 

"Still didn't found what I'm looking for..." Where the hack are the "UPS online tools" for, offered on their download site?

Do they need to be implemented in my UPSXML module? Do I need them? Do they offer any time saving in preparing shipments?

 

Can't seem to find an answer anyware.

 

I was under the impression this module interacts with www.UPS.com (in my case .nl) by interchanging data in store pickup and recipients data, suplies easy tracking for my customers on their website, IOW simplifying the whole shipping process.

 

What did I miss?

Is there a manual hidden inside one of the 20 or so various UPS contri’s I encountered in ‘contributions’ ?

Are they all to be installed?

What to do with the UPS shipping tools?

 

 

Please enlighten me (us). :blush:

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Is there a manual hidden inside one of the 20 or so various UPS contri’s I encountered in ‘contributions’ ?

Are they all to be installed?

What to do with the UPS shipping tools?

Please enlighten me (us). :blush:

You need to have an account with UPS. You can call them and they will walk you through the process of getting your account.

 

I suggest the book by Luke Welling and Laura Thomson; "PHP and MySQL Web Development"

Link to comment
Share on other sites

You need to have an account with UPS. You can call them and they will walk you through the process of getting your account.

 

I suggest the book by Luke Welling and Laura Thomson; "PHP and MySQL Web Development"

 

 

Thanks Hallmark for your advice I'll buy the book and study it.

 

But for the time beeing can somebody please explain my questions?

 

What can I expect from the "NEW XML SHIPPING Module", were do the "UPS OnlineTools" fit in? And how do I implement tracking and exchanging customer data on my webshop with UPS?

 

Spent over 2 weeks now, reading/implementing and trying to get my goods shiped out by UPS and it won't do what I expected it to do.

 

Beeing a Dumb Dutch will contribute to the fact I can't find what I'm looking for but maybe somebody can point me in the right direction.

 

Thnx

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

What can I expect from the "NEW XML SHIPPING Module", were do the "UPS OnlineTools" fit in? And how do I implement tracking and exchanging customer data on my webshop with UPS?

 

Spent over 2 weeks now, reading/implementing and trying to get my goods shiped out by UPS and it won't do what I expected it to do.

 

Beeing a Dumb Dutch will contribute to the fact I can't find what I'm looking for but maybe somebody can point me in the right direction.

I hope you aren't expecting it to go out into the warehouse and packing your stuff too are you? Actuallly, what it does is described in the readme.txt:
The module connects to UPS and retrieves a list of available shipping methods and prices and presents them to the user.
That's it. No more no less.

 

You are expected to pack the stuff the customer ordered, type in the address information on the UPS website (as far as I know the software that is available in the US for shippers is not available in Europe) and print the address label. After you have done all that you get a tracking number and I believe there is another contribution that will allow your customers to retrieve that number when they login and type that number in somewhere to find out where their shipment is (emailing them the number might be easier). That is another number you will need to type in the admin so perhaps you don't want to do that.

 

The UPS Online Tools is the web based services UPS provides such as Rates and Services and Time in Transit to which UPS XML connects to find out about costs in relation to the shipping method and expected arrival date (Time in Transit). You don't need to bother yourself with that.

 

There have been people who ship a lot with UPS in the US and made it so that a piece of software reads in the new orders, transforms the addresses to something the UPS software likes through an intermediate database and then kind of automatically gets the info into the UPS software. That is not a simple solution found in the contributions.

 

Regarding disabling the UPS XML shipping option when one of the products is too long for your liking that can be done when loading the shipping modules. At that moment you can check the object order (I believe) and check it against a list of articles that will trigger that UPS XML is not loaded. That is where PHP knowledge comes in real handy.

Link to comment
Share on other sites

After you have done all that you get a tracking number and I believe there is another contribution that will allow your customers to retrieve that number when they login and type that number in somewhere to find out where their shipment is (emailing them the number might be easier). That is another number you will need to type in the admin so perhaps you don't want to do that.

Right, you would e-mail them the tracking number when you update the status in the admin area of osCommerce. There is another contribution that is easy to add that will allow your customers to track the package from your site. Once added, I would update the customer email to give them the courtesy link to that area on your site.

 

The XML version is necessary for accurate rate quotes. The HTML version will give you quotes who's accuracy depends on when the last update was executed at UPS. That's right, it isn't always up to the minute. I don't remember how often they update it. The HTML version is also based on weight only and the number of "packages" it quotes on is based on the Maximum Weight You Will Ship variable you set in the admin of osCommerce. So if the order weighs 120lbs and you set Max Weight to 40lbs UPS HTML will quote you rates based on 3 x 40lb packages. PS the number of packages can be affected if you have any products set to "Ready to ship". These are counted as seperate packages.

 

The XML gets accurate up to the minute quotes. This module also tries to predict how many boxes will go out based on a rough, yet, decent algorithm. This is where length, width and heigth come into play. I'm not sure if this mod respects the "Ready to ship" feature. I think it does. Now, because you are using the UPS rate request XML service they require you to have an account.

Link to comment
Share on other sites

I hope you aren't expecting it to go out into the warehouse and packing your stuff too are you? Actuallly, what it does is described in the readme.txt:

That's it. No more no less.

 

Thnx, understood... 1 down, 3 to go.

 

You are expected to pack the stuff the customer ordered type in the address information on the UPS website (as far as I know the software that is available in the US for shippers is not available in Europe) and print the address label. After you have done all that you get a tracking number and I believe there is another contribution that will allow your customers to retrieve that number when they login and type that number in somewhere to find out where their shipment is (emailing them the number might be easier). That is another number you will need to type in the admin so perhaps you don't want to do that.

 

Being amongst PHP specialists, I really thought this re-typing bit on an other website had been tackled and implemented by someone. Don't tell me I'm the first one who's thought this up.

 

The UPS Online Tools is the web based services UPS provides such as Rates and Services and Time in Transit to which UPS XML connects to find out about costs in relation to the shipping method and expected arrival date (Time in Transit). You don't need to bother yourself with that.

 

So, if I'm reading this correct, I don't need any of the "UPS online tools"?

 

There have been people who ship a lot with UPS in the US and made it so that a piece of software reads in the new orders, transforms the addresses to something the UPS software likes through an intermediate database and then kind of automatically gets the info into the UPS software. That is not a simple solution found in the contributions.

 

&$*)^%$#$%, that's what I'm looking for... (Sorry just slipped) why ain't that part of a contribution? (or, why can'I find it someware)

 

Regarding disabling the UPS XML shipping option when one of the products is too long for your liking that can be done when loading the shipping modules. At that moment you can check the object order (I believe) and check it against a list of articles that will trigger that UPS XML is not loaded. That is where PHP knowledge comes in real handy.

 

Lost you on this one JanZ, would you be so kind to rephrase your sentence for this Dumb Dutch and be a bit more specific on the shipping modules part, please?

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Right, you would e-mail them the tracking number when you update the status in the admin area of osCommerce. There is another contribution that is easy to add that will allow your customers to track the package from your site. Once added, I would update the customer email to give them the courtesy link to that area on your site.

 

The XML version is necessary for accurate rate quotes. The HTML version will give you quotes who's accuracy depends on when the last update was executed at UPS. That's right, it isn't always up to the minute. I don't remember how often they update it. The HTML version is also based on weight only and the number of "packages" it quotes on is based on the Maximum Weight You Will Ship variable you set in the admin of osCommerce. So if the order weighs 120lbs and you set Max Weight to 40lbs UPS HTML will quote you rates based on 3 x 40lb packages. PS the number of packages can be affected if you have any products set to "Ready to ship". These are counted as seperate packages.

 

The XML gets accurate up to the minute quotes. This module also tries to predict how many boxes will go out based on a rough, yet, decent algorithm. This is where length, width and heigth come into play. I'm not sure if this mod respects the "Ready to ship" feature. I think it does. Now, because you are using the UPS rate request XML service they require you to have an account.

 

 

Loud and clear... :thumbsup:

 

Do have an account, jep that bit I understood, even have an "ups rates accesskey" sofar so good and it works too.

 

Hallmark and JanZ, may I thank you for being so kind explaining all this (perhaps even numerous times) to all of us, unknowing people.

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Being amongst PHP specialists, I really thought this re-typing bit on an other website had been tackled and implemented by someone. Don't tell me I'm the first one who's thought this up.
No, there have been threads on this, like UPS Worldship integration - amazing and Any interest in a contrib utilizing Quantum View Data?, XML outbound data into osC database but there is no plug-and-play solution in the contribution area.
So, if I'm reading this correct, I don't need any of the "UPS online tools"?
Not something you need to download or something like that. UPSXML is connecting to these tools.
&$*)^%$#$%, that's what I'm looking for... (Sorry just slipped) why ain't that part of a contribution? (or, why can'I find it someware)
Because not enough people have a need for that I guess or the way to solve this is not general enough to be able to add it as a contribution.
Lost you on this one JanZ, would you be so kind to rephrase your sentence for this Dumb Dutch and be a bit more specific on the shipping modules part, please?
Shipping modules are loaded in catalog/includes/classes/shipping.php:

// class constructor
function shipping($module = '') {
  global $language, $PHP_SELF;

  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
	$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

The constant MODULE_SHIPPING_INSTALLED is actually a comma separated list of the installed shipping modules (see you database in the table configuration, configuration_key MODULE_SHIPPING_INSTALLED). $this->modules is now an array with shipping modules. With the proper PHP code this array can be manipulated to throw out UPSXML when you don't want it. Actually, an example of manipulating that array is found in the shipping class used in Separate Pricing Per Customer (SPPC, contribution 716).

Link to comment
Share on other sites

No, there have been threads on this, like UPS Worldship integration - amazing and Any interest in a contrib utilizing Quantum View Data?, XML outbound data into osC database but there is no plug-and-play solution in the contribution area.

Not something you need to download or something like that. UPSXML is connecting to these tools.

Because not enough people have a need for that I guess or the way to solve this is not general enough to be able to add it as a contribution.

Shipping modules are loaded in catalog/includes/classes/shipping.php:

// class constructor
function shipping($module = '') {
  global $language, $PHP_SELF;

  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
	$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

The constant MODULE_SHIPPING_INSTALLED is actually a comma separated list of the installed shipping modules (see you database in the table configuration, configuration_key MODULE_SHIPPING_INSTALLED). $this->modules is now an array with shipping modules. With the proper PHP code this array can be manipulated to throw out UPSXML when you don't want it. Actually, an example of manipulating that array is found in the shipping class used in Separate Pricing Per Customer (SPPC, contribution 716).

 

 

Very much obliged for pointing my nose in the right direction.

 

BTW I need the TNT module to be skipped when parcels longer as 1.5 meters are sent (and marked as 'ready to ship')only sending them with UPS.

 

In case your phenomenal PHP knowledge is tickled on this, think with me to find a solution.

 

Thanks JanZ... je bent een kei

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

So, and correct me if I'm wrong, on line 22 of: /includes/classes/shipping.php I must add a php formula like:

 

if SHIPPING_LENGTH > 150, skip 'tpgpost.php'(=TNTpost) and 'flat.php'(=COD or rembours)

 

(leaving store pickup (spu.php) and UPS (upsxml.php) as available shipping option?)

 

 

How should this sound in proper PHP?

 

like so to start with?

 

if (shipping_length > 150, ....) {

 

} else {

$this->modules

}

 

please lend a hand to complete this (need Hallmark's sugested book quickly :'( )

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

So, and correct me if I'm wrong, on line 22 of: /includes/classes/shipping.php I must add a php formula like:

 

if SHIPPING_LENGTH > 150, skip 'tpgpost.php'(=TNTpost) and 'flat.php'(=COD or rembours)

 

(leaving store pickup (spu.php) and UPS (upsxml.php) as available shipping option?)

How should this sound in proper PHP?

Colorful, but this will work better (catalog/includes/classses/shipping.php):

// class constructor
function shipping($module = '') {
		// BOF changes for not loading certain shipping options
  global $language, $PHP_SELF, $cart;
		// put product id's to trigger UPS only shipping in an array (hard coded here)
		$products_ids_ups_only = array(78, 80);
		$trigger_ups_only = 0;
		$product_ids_in_cart_array = explode(',', $cart->get_product_id_list());

			foreach ($product_ids_in_cart_array as $key => $prods_id) {
				if (in_array((int)$prods_id, $products_ids_ups_only)) {
					$trigger_ups_only = 1;
				}
			}

  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
			if ($trigger_ups_only == 1) {
				// only add upsxml.php and store pickup to the array
				$this->modules = array('upsxml.php', 'spu.php');
			} else {
	$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
			}
			// EOF changes for not loading certain shipping options

Link to comment
Share on other sites

Told you I'm a newbie and have alot to learn...

 

JanZ, thanks a million

 

try it right away

 

Oeps, receive an error as I order

 

 

Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /includes/classes/shipping.php on line 149

 

what now?

Edited by HanZ

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Told you I'm a newbie and have alot to learn...

 

JanZ, thanks a million

 

try it right away

 

Oeps, receive an error

 

 

Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /includes/classes/shipping.php on line 149

 

what now?

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Oeps, receive an error

Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /includes/classes/shipping.php on line 149

That line is probably the end of the file. It looks like you missed adding a '}' when putting this code in. Perhaps after $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

If you use a text editor like for example JEdit you can put your cursor next to a curly brace and see where it's companion is. Also the color changes for comments etc. make it a lot easier to spot typo's in PHP.

Link to comment
Share on other sites

That line is probably the end of the file. It looks like you missed adding a '}' when putting this code in. Perhaps after $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

If you use a text editor like for example JEdit you can put your cursor next to a curly brace and see where it's companion is. Also the color changes for comments etc. make it a lot easier to spot typo's in PHP.

 

could it be the one marked in red? the next { is outside the added lines someware on line 63

 

// class constructor

function shipping($module = '') {

// BOF changes for not loading certain shipping options

global $language, $PHP_SELF, $cart;

// put product id's to trigger UPS only shipping in an array (hard coded here)

$products_ids_ups_only = array(78, 80);

$trigger_ups_only = 0;

$product_ids_in_cart_array = explode(',', $cart->get_product_id_list());

 

foreach ($product_ids_in_cart_array as $key => $prods_id) {

if (in_array((int)$prods_id, $products_ids_ups_only)) {

$trigger_ups_only = 1;

}

}

 

if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {

if ($trigger_ups_only == 1) {

// only add upsxml.php and store pickup to the array

$this->modules = array('upsxml.php', 'spu.php');

} else {

$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

}

// EOF changes for not loading certain shipping options

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

could it be the one marked in red? the next { is outside the added lines someware on line 63
No, that looks fine to me.

 

Another tricky thing I ran into more than once is that websites (like this forum) often use unicode characters as spaces. These are pretty much invisible but trigger errors (like that) in PHP.

 

To get rid of the unicode spaces you need to save the file as ASCII. On a PC you can do that by opening it in Kladblok (on a Dutch PC) and save it again.

 

On a Mac I use TextWrangler (or BBEdit when I'm at work) for that.

Link to comment
Share on other sites

found a missing quote on line 64 and added one '}' (not sure if it's correct)

 

here is the complete shipping.php

 

Now I'm very much puzzeled where to trigger the > 150 (cm) that will effect the skipping of tpgpost.php and flat.php?

 

==========

 

<?php

/*

$Id: shipping.php,v 1.23 2003/06/29 11:22:05 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class shipping {

var $modules;

 

// class constructor

function shipping($module = '') {

// BOF changes for not loading certain shipping options

global $language, $PHP_SELF, $cart;

// put product id's to trigger UPS only shipping in an array (hard coded here)

$products_ids_ups_only = array(78, 80);

$trigger_ups_only = 1;

$product_ids_in_cart_array = explode(',', $cart->get_product_id_list());

 

foreach ($product_ids_in_cart_array as $key => $prods_id) {

if (in_array((int)$prods_id, $products_ids_ups_only)) {

$trigger_ups_only = 1;

}

}

 

if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {

if ($trigger_ups_only == 1) {

// only add upsxml.php and store pickup to the array

$this->modules = array('upsxml.php', 'spu.php');

} else {

$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

}

// EOF changes for not loading certain shipping options

global $language, $PHP_SELF;

 

if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {

$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

 

$include_modules = array();

 

if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) {

$include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));

} else {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

$include_modules[] = array('class' => $class, 'file' => $value);

}

}

 

for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) {

include(DIR_WS_LANGUAGES . $language . '/modules/shipping/' . $include_modules[$i]['file']);

include(DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file']);

 

$GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];

}

}

}

}

function quote($method = '', $module = '') {

global $total_weight, $shipping_weight, $shipment_weight, $shipping_quoted, $shipping_num_boxes;

 

$quotes_array = array();

 

if (is_array($this->modules)) {

$shipping_quoted = '';

$shipping_num_boxes = 1;

$shipping_weight = $total_weight;

$shipment_weight = ($total_weight * 1000);

 

if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) {

$shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT;

$shipment_weight = $shipment_weight+SHIPPING_BOX_WEIGHT;

}

else {

$shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100);

$shipment_weight = $shipment_weight + ($shipment_weight+SHIPPING_BOX_PADDING/100);

}

 

if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes

$shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);

$shipping_weight = $shipping_weight/$shipping_num_boxes;

$shipment_weight = $shipment_weight/$shipping_num_boxes;

}

 

$include_quotes = array();

 

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if (tep_not_null($module)) {

if ( ($module == $class) && ($GLOBALS[$class]->enabled) ) {

$include_quotes[] = $class;

}

} elseif ($GLOBALS[$class]->enabled) {

$include_quotes[] = $class;

}

}

 

$size = sizeof($include_quotes);

for ($i=0; $i<$size; $i++) {

$quotes = $GLOBALS[$include_quotes[$i]]->quote($method);

if (is_array($quotes)) $quotes_array[] = $quotes;

}

}

 

return $quotes_array;

}

 

function cheapest() {

if (is_array($this->modules)) {

$rates = array();

 

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ($GLOBALS[$class]->enabled) {

$quotes = $GLOBALS[$class]->quotes;

for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {

if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) {

$rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],

'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',

'cost' => $quotes['methods'][$i]['cost']);

}

}

}

}

 

$cheapest = false;

for ($i=0, $n=sizeof($rates); $i<$n; $i++) {

if (is_array($cheapest)) {

if ($rates[$i]['cost'] < $cheapest['cost']) {

$cheapest = $rates[$i];

}

} else {

$cheapest = $rates[$i];

}

}

 

return $cheapest;

}

}

}

?>

 

=========

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

not wanting to sound ancy (sp?) or anything but i think my question got pushed back. Anyone have a solution for me (pg 56)?

STUFF TO DO:

-change boxes on left side to desired style

-remove default mini pictures (cartoon ones)

-modify some of the text colors

-change text headings ("Whats new here" etc.)

-add shipping modules

-add credit card module that allows to stay on my site

-remove all or all but 3 of the "new products" at bottom of main screen

-change button styles

-add SSL

-add the products from TIGI

Link to comment
Share on other sites

Thank you very much for this contribution. However, I seem to have encountered an error with this module. If you enter "N75 4B9" as a ZIP code (not valid, entered erroneously by a customer) the checkout_shipping.php page (target page) is blank.

 

It is not invalid postal codes as a whole that does it. You can enter a BS postal code and it will read back something like '111285: The postal code 9999999999 is invalid for ON Canada."

 

An error is obviously the desired output, not a blank page. Any ideas on this?

Link to comment
Share on other sites

not wanting to sound ancy (sp?) or anything but i think my question got pushed back. Anyone have a solution for me (pg 56)?

 

 

I see you use Godaddy and there is a problem with how it uses Curl that's been discussed in this thread. You have to add some code to get it to work. Check out these posts GoDaddy

 

In trying your site it is running painfully slow, so I ran a speed report here and got this message "http://www.websiteoptimization.com/services/analyze/wso.php?url=http://www.atelier-salon.com/". You probably want to work on correcting that first. People don't have much patients.

 

Also, your secure pages are rendering secure and non secure items so that brings up a warning.

 

Hope this helps

John Wisdom

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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