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

add radio select ecart

Thread began 1/04/2016 2:38 am by mrobben375515 | Last modified 1/04/2016 2:26 pm by Ray Borduin | 381 views | 8 replies |

mrobben375515

add radio select ecart

I have a products detail page that lists prices based on quantity breaks. I have the price breaks displayed in a radio group. I have an add to cart button on the page that correctly passes the product to the cart, but I can't figure out how to pass the price and quantity the user selected. This is a private site so I am attaching the site credentials and the page in question as an attachment in the PM.

Sign in to reply to this post

Ray BorduinWebAssist

You should be able to set the value of the radio buttons to contain an ID that you can use after submit to look up the associated price. Then in the Add to cart bind the price and quantity values from that lookup recordset.

Sign in to reply to this post

mrobben375515

Thank you Ray. I will update the input line like this <input type="radio" name="retailprice" value="priceID" id="retailprice_0"> where the value = the pricing record set ID. I already have a record set that holds the price breaks.I now added another record set to lookup the price when the user selects the quantity break. However, after I did this and updated the eCart Add To Cart (ecart1) SB to pass the new. However, when I click the "add to cart" button I am not sent to the cart. I just stay on the products_detail.php page. Any idea what I missed? Does tge

Sign in to reply to this post

Ray BorduinWebAssist

If the radio has: name="retailprice"

Then you would reference it with $_POST['retailprice'] in the parameter.

The blank line of code might be preventing the redirect... make sure the blank lines are removed.

Sign in to reply to this post

mrobben375515

Should I bind the pricing ID to the "value" in the radio group also?

Sign in to reply to this post

Ray BorduinWebAssist

Yes, but it does seem like you will need two recordsets... One that returns all the results to display the radio buttons, and the second one to lookup the selected value and use it to add to the cart.

Sign in to reply to this post

mrobben375515

I made the changes you suggested. However, I seem to be having the same problem, the page is not advancing. If it helps to look at the file, I am attaching the products_detail.php page and the credentials to access the site if needed.

Sign in to reply to this post

Ray BorduinWebAssist

The blank line of code on line 89 could be preventing the redirect. Try removing that.

Sign in to reply to this post

mrobben375515

Never mind, I found the problem. My value was from the wrong table. The page works correctly now. Thank you for your help.

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