close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Dynamic add to cart link

Thread began 3/10/2010 5:38 am by eaddudley390229 | Last modified 3/15/2010 10:26 am by Jason Byrnes | 5022 views | 5 replies |

eaddudley390229

Dynamic add to cart link

Hello

I'm working with dreamweaver cs4, mysql, webassist paypal extension, and php. I would like to create a products page that list the Name, Price, and a paypal add to cart link of all products on one page dynamically .

Example:

Stun Gun C $22.00 add to cart (links to paypal shopping cart for individual products)
Stun Gun S $32.00 add to cart
Black HD C $94.00 add to cart

I created a table, connected to a database, created a record set, and i've used the bindings panel to drag the name of the product and price.

Example:

Name Price Paypal
{rsProduct.title} {rsProduct.title} add to cart

How do I use the webassist extension to dynamically create a add to cart link for each product that come form the database?

Sign in to reply to this post

Jason ByrnesWebAssist

the PayPal add to cart buttons are created as forms with hidden form elements for the name, price, description and other parameters.


When you select each of the hidden elements in design view, you can change the Initial value in the property inspector. Click the lightning bolt next to value and select the corresponding row from your record set.

You then need to encase the entire form in a repeat region so that it will be repeated for each record.

Sign in to reply to this post

eaddudley390229

Dynamic drop down menu add to cart

How would I do dynamic add to cart product option add to cart

Ex.

A drop down menu that would dynamic get its options from my data base

Stun Gun 100,000 - $22.00
Stun Gun 200,000 - $32.00
Stun Gun 300,000 - $36.00

Sign in to reply to this post

Jason ByrnesWebAssist

make the price form element a select list.


set the label to be the option name and the value to the price. Then use javascript to change the value of the name field to the selected option, an example of this would look like:

<form name="form1" action="" method="post">
<select name="price" onChange="document.form1.name.value = document.form1.name.price[document.form1.name.price.selectedIndex].text">
<option value="22.00" selected="selected">Stun Gun 100,000</option>
<option value="32.00">Stun Gun 200,000</option>
<option value="36.00">Stun Gun 300,000</option>
</select>
<input type="hidden" name="name" value="Stun Gun 100,000" />
</form>
Sign in to reply to this post

eaddudley390229

Since this is coming from the database shouldn't there be some dynamic php somewhere?

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to make the select list dynamic to use the recordset that contains your products options.

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