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

NY Shipping Rule Not Working

Thread began 3/27/2015 5:25 am by sfranzken73972 | Last modified 4/08/2015 1:45 pm by Ray Borduin | 775 views | 15 replies |

sfranzken73972

NY Shipping Rule Not Working

Hi I have created a shipping rule to charge tax in only NY

However when on the checkout page after filling out a NY address it does not work.

My session variable is named svstate; this is on the checkout.php page:

<?php
@session_start();
if(!isset($_SESSION["svstate"])) {
$_SESSION["svstate"] = "".((isset($_POST["State"]))?$_POST["State"]:"") ."";
}
?>

Here is the eCart Rule:

//eCart Rule
function WAEC_eCart1_SalesTax() {
$totalTax = 0;
if (true && (($this->GetTaxableTotal() > 0) && ((isset($_SESSION['svstate'])?$_SESSION['svstate']:"") == "NY"))) {
$totalTax += ($this->GetTaxableTotal() * 0.008125);//Result
}
return WA_eCart_FormatNumber($totalTax, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule

I have attached the files in the event you need, please let me know what I have done wrong

Thanks


Note: 3/28/2015

I tried this solution but it did not work for me so I will await your reply
http://www.webassist.com/forums/posts.php?id=35117

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

sfranzken73972

Ok doing now

See private message

Sign in to reply to this post

Jason ByrnesWebAssist

in the tax rule, you had been using:
$_SESSION['WASF_CheckoutWizard_Basic_Default']['State']


but in your case the checkout form was using the name "WASF_CheckoutWizard_NewFromBlank_Default"

so i updated the session to:
$_SESSION['WASF_CheckoutWizard_NewFromBlank_Default']['State']


for USPS shipping, I added code to the checkout page to write the session contents:
<pre><?php var_dump($_SESSION); ?></pre>


the response from USPS in the session is:
["eCart1_USPS_FullResponse"]=>
string(208) "
80040B1AAuthorization failure. Perhaps username and/or password is incorrect.USPSCOM::DoAuth"

the user ID you entered for USPS Shipping is not being accepted by the USPS server.

Sign in to reply to this post

sfranzken73972

Thanks Jason

Sorry for the late response was at a meeting yesterday afternoon.

I will alert the client to check their USPS credentials.

Once I have them, rather then run the wizard again, can I just copy and paste them somewhere?

Sign in to reply to this post

Jason ByrnesWebAssist

The USPS Shipping server behave is on the confirm_cart.php page.

open that page, and open the server behavior panel, then double click the USPS Shipping server behavior to edit it and change the user ID.

Sign in to reply to this post

sfranzken73972

See Private Message

I have the information

Sign in to reply to this post

sfranzken73972

Follow Up

See Private message

Sign in to reply to this post

Ray BorduinWebAssist

You are still getting an Authorization error for the shipping API...

I believe the current error is due to not being in "production" status at USPS.

Call 800-344-7779 and ask to be moved to production status.

Sign in to reply to this post

sfranzken73972

Thanks Ray

This post has been deleted.

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