Tom Muck

Alpha Dog Blues Band
Home page
All articles
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Add To Cart Results

Displaying Add To Cart in the Results Page

This will add a form for each product/sku (assuming only one sku per product), along with a quantity field, hidden fields for skuid and product id, and a submit button. To add more than one item to the cart you would have to modify how items are added to the cart:

Change the query in CWIncResults.php to look like this:

$query_rsCWResults = "SELECT p.product_ID,
p.product_Name,
p.product_ShortDescription,
s.SKU_ID
FROM tbl_products p
INNER JOIN tbl_skus s
ON s.SKU_ProductID = p.product_ID
WHERE p.product_ID IN ($idList)
ORDER BY p.product_MerchantProductID";

Then add a form next to each product:

<form action="details.php" method="post">
<input type="text" name="qty" />
<input name="prodId" type="hidden" value="<?php echo $row_rsCWResults["product_ID"];?>" />
<input name="skuid" type="hidden" value="<?php echo $row_rsCWResults["SKU_ID"];?>" />
<input type="submit" name="submit" value="Add To Cart" />
</form>

The result will allow someone to click add to cart on each item on the results page.

Back to Cartweaver PHP FAQ, code changes, and samples

Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
About | Privacy Policy | Contact | License Agreement | ©2002-2025 Tom Muck | Dreamweaver Extensions