View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Spending over X and getting Y product free

Thread began 9/18/2009 5:11 am by Suggs | Last modified 9/24/2009 11:56 am by Suggs | 1416 views | 7 replies

Jason ByrnesWebAssist

This will need hand coding to accomplish.


Probably the best way to accomplish it will be to to add a notice to the cart page that orders over £1000 get the free item. then only add it to the cart after they click the Confirm order button on the confirm page.

in other words only add to the cart once they checkout out.

The reason for this is that it will be difficult to remove the item form the cart if they get up to £1000 then remove items to get the cart below £1000.

To do this, on the confirm page, add an add to cart server behavior, set the price of the item to 0 and the name to Free - <name of the Item>. Set the trigger to Button Confirm Order Pressed.


The add to cart code will be added to the page with the following if statement:

php:
<?php

if (isset($_POST["Submit_order"]))  {
<
add to cart code>
}
?>



You will need to add another if statement around that to check the cart subtotal:

php:
<?php if($WA_Store_Cart->GetTaxableTotal() => "1000") { ?>

<?php
if (isset($_POST["Submit_order"]))  {
<
add to cart code>
}
?>
<?php 
?>



so that the item will only be added if they place the order and the order is equal to or greater than £1000

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