close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Shipping not calculating properly

Thread began 6/16/2010 3:26 pm by chriscaldwell11357847 | Last modified 7/12/2010 3:29 pm by Eric Mittman | 1974 views | 19 replies |

chriscaldwell11357847

Shipping not calculating properly

Hello,
I have questions regarding a shipping method problem used at my site:

chris.apollohosting.com/sushisite4

When I add to cart an item, say the first shirt on the page here:

tshirts.php

the shirt is added to my cart: (cart.php).

1. The shipping appears to be almost twice the rate for normal priority mail shipping on the USPS website, when I use their calculate postage for domestic mailing of a 7 oz package.

2. And when I clear the cart, and return to say this page:

index.php the shipping charge still appears in the mini menu in the upper right hand corner of the page. It won't clear out. Yet the cart is empty.

3. The shipping rate needs total up higher when I put multiple items in the cart. For example, I put 30 tshirts in the cart to test it, yet the same 9 dollar charge was indicated.

4. Also, why do the words GRAND TOTAL appear on on the cart.php when you are shopping prior to checkout out. Should it just be a running TOTAL since people are still shopping?

5. If someone clicks on Checkout in the shopping cart page, yet does not fill in any info, shouldn't there be an Error page or something that pops up? I have noticed just a Blank page comes up.

Thank you very much for your help.

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

1) How have you configured the USPS Shipping rate lookup on the confirm page? Is the rate lookup set to use ounces or Pounds? it's impossible to guess at thew cause of the problem whith out further details on how the rate lookup was configured, perhaps you could send shoots?

2) Clearing the cart does not clear the Session that is created by the USPS shipping rate look up.

Edit the eCart object. on the shipping tab, edit the USPS shipping rule, add a second trigger, Based on number of unique items in the cart > 0.

3) make sure that the weight being used for the rate lookup is set to use the TotalColumn of TotalWeight:

php:
<?php echo WA_eCart_FormatNumber($<your Cart Name>->TotalColumn('TotalWeight'), true1); ?>



where <your Cart Name> is the name of your eCart object.

4) If you want it to say something besides grand total, you can certainly edit it to say whatever you like.

5) you would need to apply validation to the checkout page using the server validation from CSS Form builder to prevent the checkout form being submitted when blank.

Sign in to reply to this post

chriscaldwell11357847

Hi Jason,
Thank you so much for the help.

I have attached the php code for the confirm page, and the checkout page. Right after I fill out the customer info and billing info, then click Checkout, the page I'm redirected to (confirm.php) is blank.

It worked yesterday for a while. I'm trying to implement two different shipping methods, USPS priority mail and Fedex overnight. I've only created a "Select from list" type of box in the upper section of the checkout page. I have not attached the PHP code for Fedex yet. Might this be the cause of the problem?

Thanks again,
Chris

Attached Files
checkoutphp1.zip
confirmphp1.zip
Sign in to reply to this post

Jason ByrnesWebAssist

when a page displays blank, it means a php error is occurring.

to turn error reporting on add the follwoing coed at line 1:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>
Sign in to reply to this post

chriscaldwell11357847

Hey Jason,
I have added the second trigger, and I still don't get a shipping quote for multiple items in the cart. It stays at a rate of $8.95 whether I put 30 tshirts in the cart, or 1.

My updated code is attached for the checkout, cart, and confirm pages. I have also deleted the site from my server, and re-uploaded all the files.

**

If you go the the site, and a particular page, say

prints.php

and then choose 1 print, then update the cart for say 20 more prints, note how the shipping stays exactly the same as one print. Weird. Was hoping to have this resolved in time for my client appointment tomorrow at 4pm.

**
Also, in Dreamweaver's Code view, is it correct that "localhost" would be in the code, if I'm not testing on my local server, but rather uploading the pages via ftp to my actual paid hosting company? Here's what I found for example in the checkout.php page in DW's code view:

$WA_PP_ECO_Set_params[1][$nextIndex] = "http://localhost/sushi/pp_confirm.php";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "CancelURL";
$WA_PP_ECO_Set_params[1][$nextIndex] = "http://localhost/sushi/pp_cancel.php";


Thanks for all your help.
Chris

Attached Files
cartphpX.zip
checkoutX.zip
confirmx.zip
Sign in to reply to this post

chriscaldwell11357847

I uploaded the error php code. Then I went through the process of purchasing a single print.

Here's what I get on the cart.php page:


Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/bosweb/web021/b213/apo.chris/sushisite4/cart.php:6) in /hermes/bosweb/web021/b213/apo.chris/sushisite4/WA_eCart/WA_eCart_Definition_PHP.php on line 465

Here's what I get on the on the checkout page:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/bosweb/web021/b213/apo.chris/sushisite4/checkout.php:5) in /hermes/bosweb/web021/b213/apo.chris/sushisite4/WA_eCart/WA_eCart_Definition_PHP.php on line 465


And here's what I get on the confirm page:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/bosweb/web021/b213/apo.chris/sushisite4/confirm.php:6) in /hermes/bosweb/web021/b213/apo.chris/sushisite4/WA_eCart/WA_eCart_Definition_PHP.php on line 465

Notice: Undefined property: WeightUnits in /hermes/bosweb/web021/b213/apo.chris/sushisite4/confirm.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web021/b213/apo.chris/sushisite4/confirm.php:6) in /hermes/bosweb/web021/b213/apo.chris/sushisite4/confirm.php on line 209

Can I perhaps pay for support or for someone to help me finish this up so it works. Jimmy was a great help. I didn't think there would still be issues that I would crop up. I really gotta finish this up and don't know where to turn.

Thank you,
Chris

Sign in to reply to this post

chriscaldwell11357847

I think I may have discovered an issue. I opened the WA_eCart_USPS_PHP.php file in Dreamweaver, and see that the code does not reflect Priority mail, and furthermore has this listed:

if (strpos($USPS_Parameters["USPSServer"],"testing.shippingapis.com") > 0) {

That doesn't seem right. Why is this still saying testing.shipping.apis.com when Jimmy changed it and saved it during a live chat session?

I have attached the full code for this in this email. I have done nothing to this page since we had the live support/chat session. How do I fix this?

Thank you.
Chris

Attached Files
USPS_code.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
login.php

Sign in to reply to this post

chriscaldwell11357847

Hi I clicked on the support ticket and don't see any fix. Today is National Sushi Day. My client's goal was to have this site up today. I simply cannot believe it's been so long and so many daily posts to the forum. Can't we just do a live chat session again, where you can just show exactly where the code needs to be changed? I will offer 100 dollars via paypal. PLEASE this is affecting my ability to continue to make a living. I just do not want to disappoint my client any more.

Sign in to reply to this post

Jimmy Wu

The code you pointed out is just to check if it is using the testing server or not. If its using the testing server then the code is implemented.

One thing you might not want to do is to show the shipping in the cart page. This is because you don't choose the shipping provider until after the cart page, so it won't be an accurate display of the shipping cost.

For the headers already sent errors, this is usually caused by if you have extra white space between the closing php tag and the opening php tag of the next php block like this:
?>

<?php

You want it to look like this:
?>
<?php

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...