close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Size Determines Price on Static Page

Thread began 9/09/2009 6:43 am by lee365928 | Last modified 9/10/2009 3:03 pm by Jason Byrnes | 1290 views | 5 replies |

lee365928

Size Determines Price on Static Page

I have a static page that I want to have the price change when someone selects a 3 or 4XL size. I've searched the forums and I found a post that I thought might work, but I couldn't get it worked out. I'm using php/mysql. I've pasted the code I was using and a link to the previous thread.

$_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<p>
<input type="hidden" name="mycart_1_ID_Add" value="146" />
<strong class="Grey_Links"> Size</strong><span class="Grey_Links"><strong>
<hidden name="mycart_1_Size_Add" id="mycart_1_Size_Add" value="Small">
<select name="mycart_1_Price_Add" onchange="document.getElementById('mycart_1_Size_A dd').value = this.options[this.selectedIndex].text">
<option value="18.00">Small</option>
<option value="18.00">Medium</option>
<option value="18.00" selected="selected">Large</option>
<option value="18.00">Extra Large</option>
<option value="18.00">2X Large</option>
<option value="19.00">3X Large</option>
</select>
<br />
<br />
Quantity</strong></span>
<input type="text" name="mycart_1_Quantity_Add" value="1" size="4" >
</p>
<p>&nbsp;</p>
<p>
<input type="image" src="WA_eCart/Images/Pacifica/Btn1_EN_addtocart.gif" border="0" value="Add to Cart" name="mycart_1_ATC" alt="Add to Cart">
</p>
</form>

showthread.php?t=785&page=4

Sign in to reply to this post

Jason ByrnesWebAssist

can you post a link to your page so I can take a look.

Sign in to reply to this post

lee365928

the link

Sorry for the late reply. Here's the link. So far it updates the price based on the size, but doesn't pass the size to the cart.

test.php

thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Your size hidden form element is not coded correctly, you have:
<hidden name="Lake_Dallas_1_Size_Add" id="Lake_Dallas_1_Size_Add" value="Small">

It should be:
<input type="hidden" name="Lake_Dallas_1_Size_Add" id="Lake_Dallas_1_Size_Add" value="Small">

Sign in to reply to this post

lee365928

That got it

It works now. Thanks again for the help.

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome.

Sign in to reply to this post

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