close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Shipping Flat rate and UPS

Thread began 11/26/2012 6:54 pm by nokkapok441461 | Last modified 12/03/2012 5:57 pm by nokkapok441461 | 2500 views | 9 replies |

nokkapok441461

Shipping Flat rate and UPS

Hi,
I'm having trouble getting the shipping to work.
I would like to set the shipping option in the checkout page as select list for Flat Rate and UPS.
-I also would like to set it to free shipping for total amout that is less than 10$
-Flat rate would be depend on 1. Canada, US and 2. international.
I don't know how to set up to get the shipping to work for Canada Post so I just use UPS as the other option.

I added the select list in the check out page (right after shipping country in the same table.
<select name="ShippingOption" id="ShippingOption">
<option value="" selected="selected">Choose an option</option>
<option value="Flat Rate">Flat Rate</option>
<option value="UPS">UPS Standard</option>
</select>

I added hidden field in confirm page:
<input name="ShippingOption" type="hidden" id="ShippingOption" value="<?php echo((isset($_POST["ShippingOption"]))?$_POST["ShippingOption"]:"") ?>" />

and added 'set session value:
<?php
if (!session_id()) session_start();
if((((isset($_POST["ShippingOption"]))?$_POST["ShippingOption"]:"") != "")) {
$_SESSION["ShippingOption"] = "".((isset($_POST["ShippingOption"]))?$_POST["ShippingOption"]:"") ."";
}
?>

I also set triggers in shipping the Shopping cart object (I didn't add other stuff in the trigger such as free for purchase that is less than 7$ and international, Canada and US) just because I want to try if the shipping opions work.

Here's what I have.
Trigger for Flat Rate
If the value of the session varable 'ShippingObtion' is = a value of 'Flat Rate'
Calculation Flate rate = 10$

Trigger for UPS
If the value of the session varable 'ShippingObtion' is = a value of 'UPS'
Caculation Based on UPS shipping qoute value

But the shipping cost doesn't show up in the confirm page.
I'm not sure if I missed any step.

I'm not sure if the 'eCart UPS Shipping' supposed to be in server behavier for both check out and confirm page? I might've added it when I was trying things out and don't know if these might caused the problem.

Please help. Thank you

Sign in to reply to this post

Jason ByrnesWebAssist

  Here's what I have.
Trigger for Flat Rate
If the value of the session varable 'ShippingObtion' is = a value of 'Flat Rate'
Calculation Flate rate = 10$

Trigger for UPS
If the value of the session varable 'ShippingObtion' is = a value of 'UPS'
Caculation Based on UPS shipping qoute value  




is this a typo? in both rules the session you are using is 'ShippingObtion', but it should be 'ShippingOption'

Sign in to reply to this post

nokkapok441461

Sorry Jason, it's a typo it's actually 'ShippingOption'

I tried again and the flat rate seemed to work (just the basic trigger; without minimum price and based on countries)

But the ShippingOption=UPS still not working.

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need a copy of the pages please and screen shots showing how the rules are configured.

Sign in to reply to this post

nokkapok441461

Here are some screen shots

Sign in to reply to this post

nokkapok441461

Hi Jason,
Here is the file.
Thanks

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

Jason ByrnesWebAssist

the Code for the USPS shipping server behavior needs to be moved further down the page so it is after the Set Session Value behaviors.

Sign in to reply to this post

nokkapok441461

Hi Jason,
I moved the UPS in server behaviors down, still no luck. Not sure if it's the right location.
Please see in JPG screen shot.

<?php
if (($_SESSION['ShippingOption'] != "")) {
//WA eCart (Copyright 2007, WebAssist)
//WA eCart UPS Shipping - UPS
$Shipping_SuccessURL = "";
$Shipping_FailureURL = "";
$Shipping_Packaging = 0;
$Shipping_PackageArray = array();
$Shipping_PackageIndex = 0;
$Shipping_Counter = 0;
$Shipping_Parameters = array();
$Shipping_Parameters["UserID"] = "xxxxxx";
$Shipping_Parameters["Password"] = "xxxxxx";
$Shipping_Parameters["AccessKey"] = "xxxxxx";
$Shipping_Parameters["CarrierCode"] = "11";
$Shipping_Parameters["PickupType"] = "07";
$Shipping_Parameters["CustomerClass"] = "04";
$Shipping_Parameters["ShipperNumber"] = "xxxxxx";
$Shipping_Parameters["ShipperCity"] = "Ottawa";
$Shipping_Parameters["ShipperState"] = "ON";
$Shipping_Parameters["ShipperZip"] = "K2G 3W1";
$Shipping_Parameters["ShipperCountry"] = "Canada";
$Shipping_Parameters["ShiptoCity"] = "".$_SESSION['eCartCheckoutForm_shipping_city'] ."";
$Shipping_Parameters["ShiptoState"] = "".$_SESSION['eCartCheckoutForm_shipping_state_province'] ."";
$Shipping_Parameters["ShiptoZip"] = "".$_SESSION['eCartCheckoutForm_shipping_postcode'] ."";
$Shipping_Parameters["ShiptoCountry"] = "".$_SESSION['eCartCheckoutForm_shipping_country'] ."";
while (($Shipping_Packaging == 1 && !$nokkapok->EOF()) || ($Shipping_Packaging == 0 && $Shipping_Counter == 0)) {
if (WA_eCart_UPS_IsTrueValue("true")) {
$Shipping_PackageArray[] = array();
$Shipping_PackageIndex = sizeof($Shipping_PackageArray)-1;
$Shipping_PackageArray[$Shipping_PackageIndex]["eCart_Quantity"] = (($Shipping_Packaging == 1)?$nokkapok->DisplayInfo("Quantity"):1);
$Shipping_PackageArray[$Shipping_PackageIndex]["IsPackage"] = "true";
$Shipping_PackageArray[$Shipping_PackageIndex]["Quantity"] = "1";
$Shipping_PackageArray[$Shipping_PackageIndex]["WeightUnits"] = "LBS";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".$nokkapok->DisplayInfo("TotalWeight") ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "02";
$Shipping_PackageArray[$Shipping_PackageIndex]["SizeUnits"] = "IN";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageLength"] = "14";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWidth"] = "17";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageHeight"] = "1.5";
//Special Services
}
$Shipping_Counter++;
if ($Shipping_Packaging == 1) $nokkapok->MoveNext();
}
if ($Shipping_Packaging == 1) $nokkapok->MoveFirst();
$Shipping_Result = WA_eCart_UPS_GetRateQuote($nokkapok, $Shipping_Parameters, $Shipping_PackageArray);
if ($Shipping_Result && $Shipping_SuccessURL != "")
$nokkapok->redirStr = $Shipping_SuccessURL;
else if (!$Shipping_Result && $Shipping_FailureURL != "") {
Header("Location: " . $Shipping_FailureURL); exit;
}
}
else if (!isset($_SESSION["nokkapok_UPS_Success"])) {
WA_eCart_UPS_SetSessionDefaults($nokkapok);
}
?>

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:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

nokkapok441461

Thank you, I've already put the link it in there.

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