|
Rank: Starting Member
Groups: Registered
Joined: 1/13/2004 Posts: 2 Location: ,
|
I am using ColdFusion MX on my site and my problem is the following:
---------------------------------------------------------------------
you have a page that is created dynamically from a database and SQL query which shows all the products within the database, let's call this the product page. When you click on one of the products titles or image, it takes you to a second dynamically constructed page with more specific info on that item, let's call this the detail page.
Now obviously, the "URL.recordid" is a big part of this whole thing to work so that the item selected from your products list is the right one to show up in the details page.
But when one creates a purchase button and/or shopping cart through paypal, they give you code such as the following -
Add to Cart Button
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<p>
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="fangear@fangear.ws">
<input type="hidden" name="item_name" value="Inhumanoids">
<input type="hidden" name="amount" value="20.00">
<input type="hidden" name="image_url" value="https://www.fangear.ws/FanGearImages/images/cartlogo.gif">
<input type="hidden" name="cn" value="Fellow Fan">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="http://www.fangear.ws/FanGearImages/images/getbutton.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="add" value="1">
</p>
</form>
and
View Cart Button
The HTML code below contains your "View Cart" button. Copy the code and paste it onto your webpage. When your customers press the button, they will be taken to a webpage listing the items they will purchase from you.
<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="fangear@fangear.ws">
<input name="submit" type="image" src="FanGearImages/images/SubPagesCartButton.gif" alt="Make payments with PayPal - it's fast, free and secure!" width="58" height="31" border="0">
<input type="hidden" name="display" value="1">
</form>
When you look over the code, you realize that it can not be used with dynamically created pages. The code works if you physically placed a button for each item, i.e. . . . not dynamically created page.
How can I have the PayPal generated button notice what the dynamiclly selected product is so that when a customer adds it to his or her cart, it is the correct product??????????
Right now, no matter what item I select, the button places what I have manually typed in to it's hidden fields, . . . can that info be creatred dynamically?
I would really appreciate some concrete assistance with this, I am assuming it has something to do with a hidden field, or variable I need to somehow pass along.
|