uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
Discounts in v3.5

Knowledge Base Lobby : uShop Support Conference : General Questions
Oct-21-17 12:40 AM EST
Original Message
Discounts in v3.5
Author Nancy Bohs on 09-30-2002 at 11:04 (EST)
Is there any work-around for the uShopDiscount1 applet and Javascript Discount only working with percentage values?

OR

Is there any way to automatically apply coupons based on subtotal?

(I really miss the subtotal flat rate discount from version 2.)

Thanks!
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Discounts in v3.5 Bill Weiner, 2002-10-01 04:49:48 (1)
            discount solution Nancy Bohs, 2002-10-01 13:19:29 (2)

Messages In This Discussion
         1. RE: Discounts in v3.5
        Author Bill Weiner on 10-01-2002 at 04:49 (EST)
There are a couple ways to handle that... here's one:

Try utilizing the uShopJSI JavaScript function "setCouponNumber(String newValue)" to set the coupon number based on the "getSubtotal()" value.

That is:

STEP 1: Add the uShopJSI applet to the page where you want to set the coupon number.

STEP 2: Write a JavaScript like this that get's kicked off probably from the page's "onLoad" function:

function setCouponBasedOnSubtotal()
{
var subtotal = document.uShopJSI.getSubtotal();
if (subtotal >= 100)
{
document.uShopJSI.setCouponNumber("12345");
}
else if (subtotal >= 10)
{
document.uShopJSI.setCouponNumber("67890");
}
else
{
document.uShopJSI.setCouponNumber("12321");
}
}

Refer to the uShop Programmer's Guide for more information on using JavaScripts with uShop:

http://www.uburst.com/uShop/reference/programmers_guide.html

Also refer to the JavaScript Example in the Online Applet Reference:

http://www.uburst.com/uShop/reference/applets.html
TABLE OF CONTENTS
                 2. discount solution
                Author Nancy Bohs on 10-01-2002 at 13:19 (EST)
Thanks for the quick reply! This is exactly what I need. I had tried using setDiscountRate() but got hung up by the percentage thing.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.