Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

One cost for one menu drop down and add cost for another is selected


avrumit

Recommended Posts

Hello I have the following in a paypal add to basket command,

six different options

on0 to on5

The price for now is set at 100 at whatever selected.

I want it to be 100 if on0 to on2 is selected by itself but if on3 to on5 are selected then the price is to be 200.

(It can also be if only on0 is selected 100 and if on5 is also slected then it should be 200)

I tried the following

 

 

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">

<script type="text/javascript">

<!--

function check_both()

if (os0.value = "Option_1" ) {

return "200";

}

else {

return "300";

}

 

but it wont go

 

This is for a contact lens site so if a customer selects only for right eye then the price is 100 but if the left eye option is also selected then the price should be 200.

I cant use a option menu with different prices as I also want the customer to choose his power with the same menu.

Here's a copy of the code so far but if selected (no matter how many of the options the price will always be 100)

Hope someone can help me out on this.

Avrumi

 

 

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input type="hidden" name="cmd" value="_cart">

<input type="hidden" name="business" value="KTD35UHQGLN9J">

<input type="hidden" name="lc" value="IL">

<input type="hidden" name="item_name" value="?????">

<input type="hidden" name="item_number" value="001">

<input type="hidden" name="amount" value="100.00">

<input type="hidden" name="currency_code" value="ILS">

<input type="hidden" name="button_subtype" value="products">

<input type="hidden" name="no_note" value="0">

<input type="hidden" name="cn" value="Add special instructions to the seller">

<input type="hidden" name="no_shipping" value="2">

<input type="hidden" name="rm" value="1">

<input type="hidden" name="return" value="https://www.maga4less.com/success">

<input type="hidden" name="cancel_return" value="https://www.maga4less.com">

<input type="hidden" name="add" value="1">

<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">

<table>

<tr><td><input type="hidden" name="on0" value="îñôø òéï éîéï">îñôø òéï éîéï</td></tr><tr><td><select name="os0">

<option selected value="0">áçø</option>

<option value="-0.25">-0.25</option>

<option value="-0.50">-0.50</option>

<option value="-0.75">-0.75</option>

<option value="-1.00">-1.00</option>

<option value="-1.25">-1.25</option>

<option value="-1.50">-1.50</option>

<option value="-1.75">-1.75</option>

<option value="-2.00">-2.00</option>

<option value="-2.25">-2.25</option>

<option value="-2.50">-2.50</option>

<option value="-2.75">-2.75</option>

<option value="-3.00">-3.00</option>

<option value="-3.25">-3.25</option>

<option value="-3.50">-3.50</option>

<option value="-3.75">-3.75</option>

<option value="-4.00">-4.00</option>

<option value="-4.25">-4.25</option>

<option value="-4.50">-4.50</option>

<option value="-4.75">-4.75</option>

<option value="-5.00">-5.00</option>

<option value="-5.25">-5.25</option>

<option value="-5.50">-5.50</option>

<option value="-5.75">-5.75</option>

<option value="-6.00">-6.00</option>

<option value="-6.25">-6.25</option>

<option value="-6.50">-6.50</option>

<option value="-6.75">-6.75</option>

<option value="-7.00">-7.00</option>

<option value="-7.25">-7.25</option>

<option value="-7.50">-7.50</option>

<option value="-7.75">-7.75</option>

<option value="-8.00">-8.00</option>

<option value="-8.25">-8.25</option>

<option value="-8.50">-8.50</option>

<option value="-8.75">-8.75</option>

<option value="-9.00">-9.00</option>

<option value="-9.25">-9.25</option>

<option value="-9.50">-9.50</option>

<option value="-9.75">-9.75</option>

<option value="-10.00">-10.00</option>

<option value="-10.25">-10.25</option>

<option value="-10.50">-10.50</option>

<option value="-10.75">-10.75</option>

<option value="-11.00">-11.00</option>

<option value="+0.25">+0.25</option>

<option value="+0.50">+0.50</option>

<option value="+0.75">+0.75</option>

<option value="+1.00">+1.00</option>

<option value="+1.25">+1.25</option>

<option value="+1.50">+1.50</option>

<option value="+1.75">+1.75</option>

<option value="+2.00">+2.00</option>

<option value="+2.25">+2.25</option>

<option value="+2.50">+2.50</option>

<option value="+2.75">+2.75</option>

<option value="+3.00">+3.00</option>

<option value="+3.25">+3.25</option>

<option value="+3.50">+3.50</option>

<option value="+3.75">+3.75</option>

<option value="+4.00">+4.00</option>

<option value="+4.25">+4.25</option>

<option value="+4.50">+4.50</option>

<option value="+4.75">+4.75</option>

<option value="+5.00">+5.00</option>

<option value="+5.25">+5.25</option>

<option value="+5.50">+5.50</option>

<option value="+5.75">+5.75</option>

<option value="+6.00">+6.00</option>

<option value="+6.25">+6.25</option>

<option value="+6.50">+6.50</option>

<option value="+6.75">+6.75</option>

<option value="+7.00">+7.00</option>

<option value="+7.25">+7.25</option>

<option value="+7.50">+7.50</option>

<option value="+7.75">+7.75</option>

<option value="+8.00">+8.00</option>

</select> </td></tr>

<tr><td><input type="hidden" name="on1" value="÷éîåø òéï éîéï">÷éîåø òéï éîéï</td></tr><tr><td><select name="os1">

<option value="8.6">8.6 </option>

<option value="8.8">8.8 </option>

<option value="8.9">8.9 </option>

</select> </td></tr>

<tr><td><input type="hidden" name="on2" value="÷åèø òéï éîéï">÷åèø òéï éîéï</td></tr><tr><td><select name="os2">

<option value="14.0">14.0 </option>

<option value="14.2">14.2 </option>

</select> </td></tr>

<tr><td><input type="hidden" name="on3" value="îñôø òéï ùîàì">îñôø òéå ùîàì</td></tr><tr><td><select name="os3">

<option selected value="0">áçø</option>

<option value="-0.25">-0.25</option>

<option value="-0.50">-0.50</option>

<option value="-0.75">-0.75</option>

<option value="-1.00">-1.00</option>

<option value="-1.25">-1.25</option>

<option value="-1.50">-1.50</option>

<option value="-1.75">-1.75</option>

<option value="-2.00">-2.00</option>

<option value="-2.25">-2.25</option>

<option value="-2.50">-2.50</option>

<option value="-2.75">-2.75</option>

<option value="-3.00">-3.00</option>

<option value="-3.25">-3.25</option>

<option value="-3.50">-3.50</option>

<option value="-3.75">-3.75</option>

<option value="-4.00">-4.00</option>

<option value="-4.25">-4.25</option>

<option value="-4.50">-4.50</option>

<option value="-4.75">-4.75</option>

<option value="-5.00">-5.00</option>

<option value="-5.25">-5.25</option>

<option value="-5.50">-5.50</option>

<option value="-5.75">-5.75</option>

<option value="-6.00">-6.00</option>

<option value="-6.25">-6.25</option>

<option value="-6.50">-6.50</option>

<option value="-6.75">-6.75</option>

<option value="-7.00">-7.00</option>

<option value="-7.25">-7.25</option>

<option value="-7.50">-7.50</option>

<option value="-7.75">-7.75</option>

<option value="-8.00">-8.00</option>

<option value="-8.25">-8.25</option>

<option value="-8.50">-8.50</option>

<option value="-8.75">-8.75</option>

<option value="-9.00">-9.00</option>

<option value="-9.25">-9.25</option>

<option value="-9.50">-9.50</option>

<option value="-9.75">-9.75</option>

<option value="-10.00">-10.00</option>

<option value="-10.25">-10.25</option>

<option value="-10.50">-10.50</option>

<option value="-10.75">-10.75</option>

<option value="-11.00">-11.00</option>

<option value="+0.25">+0.25</option>

<option value="+0.50">+0.50</option>

<option value="+0.75">+0.75</option>

<option value="+1.00">+1.00</option>

<option value="+1.25">+1.25</option>

<option value="+1.50">+1.50</option>

<option value="+1.75">+1.75</option>

<option value="+2.00">+2.00</option>

<option value="+2.25">+2.25</option>

<option value="+2.50">+2.50</option>

<option value="+2.75">+2.75</option>

<option value="+3.00">+3.00</option>

<option value="+3.25">+3.25</option>

<option value="+3.50">+3.50</option>

<option value="+3.75">+3.75</option>

<option value="+4.00">+4.00</option>

<option value="+4.25">+4.25</option>

<option value="+4.50">+4.50</option>

<option value="+4.75">+4.75</option>

<option value="+5.00">+5.00</option>

<option value="+5.25">+5.25</option>

<option value="+5.50">+5.50</option>

<option value="+5.75">+5.75</option>

<option value="+6.00">+6.00</option>

<option value="+6.25">+6.25</option>

<option value="+6.50">+6.50</option>

<option value="+6.75">+6.75</option>

<option value="+7.00">+7.00</option>

<option value="+7.25">+7.25</option>

<option value="+7.50">+7.50</option>

<option value="+7.75">+7.75</option>

<option value="+8.00">+8.00</option>

</select> </td></tr>

<tr><td><input type="hidden" name="on4" value="÷éîåø òéï ùîàì">÷éîåø òéï ùîàì</td></tr><tr><td><select name="os4">

<option value="8.6">8.6 </option>

<option value="8.8">8.8 </option>

<option value="8.9">8.9 </option

</select> </td></tr>

<tr><td><input type="hidden" name="on5" value="÷åèø òéï ùîàì">÷åèø òéï ùîàì</td></tr><tr><td><select name="os5">

<option value="14.0">14.0 </option>

<option value="14.2">14.2 </option>

</select> </td></tr>

</table>

<input type="image" src="https://www.paypalobjects.com/he_IL/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - ???? ???? ??????? ???? ????? ?????!">

<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">

</form>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...