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.