close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Failure with "$WAGLOBAL_Shipping_Enabled = true;"

Thread began 8/11/2009 3:27 pm by mick106153 | Last modified 9/23/2009 7:52 pm by Eric Mittman | 2215 views | 11 replies |

mick106153

Failure with "$WAGLOBAL_Shipping_Enabled = true;"

Using USPS shipping.
With $WAGLOBAL_Shipping_Enabled = true; I am directed to checkout-failure.php. Regardless of which $WAGLOBAL_USPS_Server I choose.
With $WAGLOBAL_Shipping_Enabled = false; the order is processed successfully, I get the customer receipt and the test confirmation from Authorize.net. At no point is there any mention of shipping cost or type except in the receipt where shipping amount = $0.00.

Help! please

Mick

intuHorsesPowerStore/

Sign in to reply to this post

mick106153

OK!
I talked to USPS and I think in the deep recesses of my mind I remember someone else mentioning this.
Since you guys developed this, no testing is required.
Just call up USPS at the number they provide on the email response to your initial application and they'll put you on the production server!. Voilà! I now can process orders all the way through. Only problem is – is $10.35 the correct amount for a 1 lb package shipped from me to me?

Sign in to reply to this post

mick106153

OK. OK!
So, PRIORITY is the default and the priority default is flat rate package size x and costs $10.35 so I plugged in PARCEL in place of PRIORITY in WA_Globals.php to see what would happen and That failed.
So, why are the USPS shipping setting keys shown if only PRIORITY is an option?
So if customer x orders 3 shirts is he going to be hit with 3 times $10.35?
And all the other possible questions that would logically follow…

Please elucidate

Mick

Sign in to reply to this post

Eric Mittman

There are two things going on here. The first thing is that you can use the other shipping types like PARCEL but you will need to update your shipping file for USPS in the eCart folder, I'm attaching the file to this post. Make sure you put it in your WA_eCart folder.

The other thing going on here is that PRIORITY is a flat rate service, so the price will not change based on weight or location, it will changed based on the package type. Here is a link to a post that list the available options for this setting:

showpost.php?p=11467&postcount=4

Attached Files
PowerStore 2_0.zip
Sign in to reply to this post

mick106153

Did as you suggested and when I processed the order I got an error something like "unexpected T_CONCAT_EQUAL yada yada yada at line 49 of WA_eCart_USPS_PHP.php"
Closer inspection showed that at lines 49, 52 and 53 you had "$USPS_XML ..= etc." .
So I changed line 49 to "$USPS_XML .= etc." and when I processed the order I got "unexpected T_CONCAT_EQUAL yada yada yada at line 52 of WA_eCart_USPS_PHP.php".
So I changed lines 52 and 53 to "$USPS_XML .= etc." and this time it worked as expected.
My order was processed and showed the rate for the small flat rate box. I'm hoping that was the right thing to do – not being a code monkey.
I'm curious as to why it was necessary to upload this revised file. Couldn't I have just changed to ["PackageType"] = "Sm Flat Rate Box"; on confirm.php and be done with it?

I placed an order for 6 mugs 3 tees of one type and 2 tees of another and shipping was still only $4.95.
How do we address that problem?
Obviously I can't fit all that into one small flat rate box.

Mick

Just reread and I see that the revised file was to enable other shipping types like PARCEL. Correct?

Just changed WA_Globals.php to PARCEL and now I get different rates depending on the number/weight/zip of the total or some such. Don't know if results RE: shipping cost are appropriate but they look to be. TOO Tired –MUST Sleep!

Mick

Sign in to reply to this post

Eric Mittman

Sorry about the extra characters in the file, thanks for pointing that out. Like you said the extra file is for the PARCEL type. Whenever you use the PRIORITY you will get a flat rate dependent on the box you use, the larger the box the higher the rate.

Sign in to reply to this post

ramenfreak

Ideally, I would like different Priority Mail flat-rate box sizes for different weight totals, but for now I'll settle with just getting the small flat rate box to work.

I changed line in the USPS_PHP file as instructed in this forum thread: showpost.php?p=11467&postcount=4

On checkout, I'm getting the same error message that Mick got:
"Parse error: syntax error, unexpected T_CONCAT_EQUAL in........WA_eCart/WA_eCart_USPS_PHP.php on line 49"

Here are lines 49-53 from that file (I think this is for parcel - which I don't want).

49            $USPS_XML .= "<Service>" . $USPS_Parameters["CarrierCode"] . "</Service>";
50 }
51 else {
52 $USPS_XML .= "<Service>" . $USPS_Parameters["CarrierCode"] . "</Service>";
53 $USPS_XML .= "<FirstClassMailType>" . $USPS_Parameters["FirstClassMailType"] . "</FirstClassMailType>"; //Optional unless Service is FIRST CLASS


Please advise.

Sign in to reply to this post

Eric Mittman

The code that you posted looks like it should be working for you without this error. I have made the updates that are needed to the original file and I'm attaching it to this post.

Please give it a try with this new file to ensure that the error goes away. Make sure you update it on your live server as well. The file needs to be placed inside of the WA_eCart folder in your site.

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

ramenfreak

That file worked.

Funny. I had originally installed the file from the "known issues" section of my downloads page and overwrote the file that came with PowerStore 2.

Now I'm getting another error, but I'll figure it out.. I hope!

Sign in to reply to this post

Eric Mittman

Glad to hear it worked out for you. Please don't hesitate to post back about the new issue you are experiencing if you need any help.

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