Home I Log In I DemoShop I FAQ I Contact I Security I Help
.   .
Help
 
 

How to Add Option fields to eButtonz

IMPORTANT: VERSION 5+ HEAD CODE ONLY. Click here if you need to update your head code.

!!! VERSION 6.1+ USERS CLICK HERE !!!

Insert the following code where you want an options drop down:

<script language="JavaScript">
<!--
makeO("bike01","Pink","pkBike","Yellow","yellBike");
//-->
</script>

This gives a dropdown with two options, Pink or Yellow as follows and refers to two separately defined products with codes pkBike and yellBike:


Girl's bike. Suitable for ages 3-4. Qty:

To create this options list 3 product have to be created as follows:

bike 01: This is the master product and must be defined separately. The product reference bike01 must be used in the buy button (if an option's product code was used in the buy button it would be selected every time!) The master product code must not appear in more than one dropdown on a single web page. The same code must appear in the quantity field, if you have one.(Click here to find out how to add quantity fields)

pkBike: This is an option product and must be defined separately

yellBike: This too is an option product and must be defined separately

General: You may have as many options as you like in a single dropdown, but only one dropdown per "buy" button. If your products vary in two different ways (e.g. size and colour) it is necessary to split them into multiple products. e.g. Small dress (red/green/blue), Medium dress (red/green/blue), Large dress (yellow/gold).

Prices may vary from one option to the other. However if differing prices are used then it would not make sense to display the price in the buy button.

Example:. A product with four colours, a quantity field and a buy button:


Girl's bike. Suitable for ages 3-4. Qty:

<script language="JavaScript">
<!--
makeQ("bike03",5,1);
</script>

Notes: makeQ instructs the cart to create a quantity field. The first variable is the product code (bike03). The second is the width of the field (5). The third is the default quantity (1).

<script language="JavaScript">
<!--
makeO("bike03","Pink","bike03p","Yellow","bike03y","Green","bike03g","Blue","bike03bl");
//-->
</script>

Notes: makeO instructs the cart to create an options field. In this case it includes 4 options, Pink, Yellow, Green and Blue. Each option must be defined separately as a product. bike03 must also be defined separately as a product to act as the buy button.

<script language="JavaScript">
<!--
makeB("YourShopCode","bike03","Buy me for: ",2);
//-->
</script>

Notes: MakeB instructs the cart to create a buy button. The first variable is your shop code. The second variable, bike03, is the product code used for the button. The third variable is the buy button image URL or button message "Buy Me For: " (see below for button styles). The fourth variable is the button style definition: 1 is the code for an image, 0 is a form button with text only, 2 is a form button with text and the price displayed d (as in this example). In the above example, the price that appears in the button will be drawn from the definition of bike03. It only makes sense to do this if all the variants are the same price.

"Button Style" is used to determine the style of your buy buttons.

Text only: Select this option for a standard form button.

Text & Price: Select this option for a standard form button which can also display the price of your product.

Image: Select this option to use your own image as the buy button. To select an image you may manually enter an absolute URL for your chosen image. Your absolute URL may look something like : http://www.mywebsite.com/images/buybutton.gif

If this page does not help you please email us at : Email us

ts_000048 Last modified: 28 March 2003

 
       
.   .
. Back .
Home I Log In I DemoShop I FAQ I Contact I Security I Help
copyright moltengold ltd