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
Two different prices, image button

Knowledge Base Lobby : uShop Support Conference : Programmer Tips
Nov-21-17 04:46 AM EST
Original Message
Two different prices, image button
Author kepitech on 05-08-2002 at 03:05 (EST)
I have two option lists, the first one is the size, the second one is the flavor. Since I use my own image button, I am using javascript function instead of the given applets.

I just can't seem to figure out how to have two different prices based on the size, and also use the image button i created to add it to the shopping cart.

Thank you
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Two different prices, image button Bill Weiner, 2002-05-08 05:42:34 (1)
            Got it to work kepitech, 2002-05-09 04:56:51 (2)

Messages In This Discussion
         1. RE: Two different prices, image button
        Author Bill Weiner on 05-08-2002 at 05:42 (EST)
I don't know the form field names that you are using... but here is at least one way to set the price based on the size:

In your add function, first determine the selected size with something like this:

var size = document.P00004.size.options[document.P00004.size.selectedIndex].value;

(The above line should be on just one line.)

Next initial a price variable, such as:

var price = "$0.00";

Use a "if" statement to set the price accordingly, such as:

if (size == "Large")
{
price = "$15.00";
}
else if (size == "Medium")
{
price = "$12.00";
}
else
{
price = "$10.00";
}

And then just use the "price" variable in the uShopJSI.addProduct() call.
TABLE OF CONTENTS
                 2. Got it to work
                Author kepitech on 05-09-2002 at 04:56 (EST)
Thank you!!

TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.