eCart Object Shipping Rules - flat rate for sepecific states

Thread began 12/10/2009 5:18 pm by Kevin373660 | Last modified 12/11/2009 6:09 pm by Eric Mittman | 1084 views | 3 replies |

12/10/2009 5:18 pm  |  #1 Kevin373660

eCart Object Shipping Rules - flat rate for sepecific states

Using eCart 4.5.2 and am working with php. I have the shipping rates automatically pulling from UPS with my basic configuration. Then I created a rule to provide customers a flat \$10 shipping fee for specific States when they select the "Standard/Ground" service. In my db the states that qualify for this flat rate are given a value=1 in a flatShipRate column.

Unfortuatly, with both rules (as defined below) the vaules are combined. That is the customers shipping charges are equal to the sum of \$10 plus the UPS shipping fees. The good news is that it works.

How do I configure the rules so that if the flat rate rule applies to that shipment then the UPS shipping fees are not added/calculated? Would I also need another session variable so that if: eCartChecoutForm_Carrier_Service+flatShipRate != 12 ? Or do I need a "Custom Expression Evalueates to True" selection with formula? It is my first time working with the object rules.

**UPS SHIPPING RULE - in eCart Object**
Conditions: UPS shipping quote !=0

Separator:
Condition: Based on UPS shipping quote value

UPS Shipping quote is: !=
a value of 0

Calculation: Based on UPS shipping quote Value
UPS Shipping quote plus
0

**MY FLAT RATE RULE FOR SPECIFIC STATES**
Condition: Subtotal for any column
If the subtotal of column TotalWeight
is >
a value of 0

Separator AND
Condition: Based on session variable value
If the subtotal of column eCartChecoutForm_Carrier_Service
is =
a value of 11

Separator AND
Condition: Based on session variable value
If the subtotal of column flatShipRate
is =
a value of 1

Calculation: Flat Rate
\$ 10.00

12/10/2009 6:14 pm  |  #2 Kevin373660

I got it to work!!!

I got it to work!!! I created a third session value and use it to determine if code should go to courier for rates.

<?php
if (!session_id()) session_start();
if((\$_SESSION['eCartCheckoutForm_shipping_state_province'] != "")) {
\$_SESSION["NoFlatShipRate"] = ("".\$_SESSION['eCartCheckoutForm_Carrier_Service'] ."")+("".\$_SESSION['flatShipRate'] ."");
}
?>
<?php
// if (\$_SERVER["REQUEST_METHOD"] == "POST") {
if (\$_SERVER["REQUEST_METHOD"] == "POST" && \$_SESSION["NoFlatShipRate"] !=12 && \$ClubCartUSA->TotalColumn("TotalWeight") > 0) {

12/11/2009 12:11 pm  |  #3 Kevin373660

While running tests this morning, shipping costs were some how bypassed on an order. I could not recreate the problem again. Now it seems to be working again. I am just wonding if I have the code placed correctly that might have been affected the resaults if there were any transmittion/connnection delays (ex. the eCart Include code)?

12/11/2009 6:09 pm  |  #4 Eric Mittman

If you are consistently getting good results with your testing then it indicates that you have it all configured correctly. One thing you should look out for though is that if you do successive tests without the session getting cleared out you can have the values that trigger the shipping rule already set before you get to the checkout page. It is a good idea to start new sessions in between your testing cases by restarting your browser or using a different one.

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.

Everything else!

Close Window

Account or customer service questions?

Need technical support?

Content

Layout

Ease of use

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 Window

We were unable to retrieve the attached file

Close Window

Attach and remove files

• Text Formatting
• Insert Element
• Block Formatting
• Cancel
Close Window

Close Window

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