close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Free delivery for Postcodes

Thread began 11/30/2011 8:32 pm by simmo515303621 | Last modified 12/13/2011 2:11 pm by simmo515303621 | 2637 views | 10 replies |

simmo515303621

Free delivery for Postcodes

Hi,

Would like to create a shipping rule where shipping is FREE if the order postcode is listed in the FREE postcode database I have created.

Any ideas?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to create a recordset to lookup the entered postal code, then set a session variable using Recordset Not Empty trigger to signal that the postal code was found. set the value of the session to 1.

in your shipping rule, add a trigger for Based on session variable value:
if the Session Variable "freeShipping" is "!=" a value of "1"


this will cause shipping to be applied only if the postal code is not found.

Sign in to reply to this post

simmo515303621

ok that makes sense...

But I cant understand how to write the rule what exactly would the rule look like? Id there a guide for how to write rules?

Sign in to reply to this post

Ian S

Its a while since I have used eCart rules but I am pretty sure that you just trigger it based on a value.

You would set it to use a shipping value of 0 if a certain value is found. I think the trigger terminology is 'Based on a value'

And in the value field you would write

$_SESSION['freeshipping'] == '1'

Sorry for being a bit vague, but hopefully will point in the right direction a bit.

Cheers
Ian

Sign in to reply to this post

simmo515303621

Ok thanks I understand how to write rules now - thanks... I now have another issue.

I want the Shipping to show up when

No free postcode is set and the total cart amount is less than $150 - so the only way the shipping should be removed is when 2 conditions are met at once. Shipping Free Postcode set, and cart amount more than $150

function WAEC_eCart1_fREE() {
$totalShipping = 0;
if (true && (((isset($_SESSION['freePostcode'])?$_SESSION['freePostcode']:"") != "1") && ($this->TotalColumn("TotalPrice") < 150))) {
$totalShipping += 10;//Result
}

I have the Free Postcode Part Working and I can Get the under $150 to work, but when I add them as one rule is never adds shipping to the order?

Sign in to reply to this post

Ian S

Wouldn't you just setup a separate trigger / rule rather than trying to join the two?

So if the free post code condition is met - you get free shipping
If the value of the total is > 150 - you get free shipping

Otherwise, the shipping is applied.

Cheers
Ian

Sign in to reply to this post

simmo515303621

Hi Ian,

And thanks for a reply - yes that would make sense and I would do that if the rules were separate..

In this rule, both conditions need to be met at once in order to have free shipping, not one or the other...

eg.... If the free postcode is set to true, but the cart subtotal is less than $150 then no free delivery

if Cart contents is over $150 but the Free postcode is not set - no free delivery.

Only when the cart subtotal and the free post condition is met - does the client get free shipping

Sign in to reply to this post

Jason ByrnesWebAssist

in the shipping rule, set the triggers as:
Based on Session Variable value:
if the session variable "'freePostcode" is "!=" a value of "1"

AND
Based on Cart Subtotal:
if the Subtotal For the Cart is "<" a value of "150"

Sign in to reply to this post

simmo515303621

Hi Jason,

Yep thats exactly what I have done - but its not working for some reason..

As I mentioned I tried each rule individually - then logic dictates that all I need to do is, as you said, add them to the one trigger with the AND separator.

But it does not seem to work - I have tried every combination...

Here is my proccess...

I have added a recordset called rsFreepostcode...When the Postcode field is posted from the Chekout.php the recordset looks to see if the postcode exists... after the recordset I execute the following code to the confirm.php

session_start();
if($row_rsFreepostcode['freePostcode_postcode'] != "") {
$_SESSION['freePostcode'] = '1';
} else {
$_SESSION['freePostcode'] = '0';
}

I then added the Session rule to ecart if the Session Variable "freeShipping" is "!=" a value of "1"

Now by itself this works fine...

I then added the; if the Subtotal For the Cart is "<" a value of "150" ....... AND separated

but it is triggering individually - or not triggering at times - its seems a bit random

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