moving variable into cart
Hi,
On my site I have price and saleprice, and sizes and backorder message. I have been able to have the item sale price show in the cart if it is on sale and the size show in the cart if it has a size. I have used the same principle for the back order message, if an item is back ordered, the message comes up on the detail page with the size that is backordered. In my columns bindings I have BO for backorder, and it is text that is unique. On the detail page I have the code:
<?php if ($row_rsSize['backordermsg'] != "0") { // Show if recordset not empty
?>
<?php
do {
?>
<p><?php echo $row_rsSize['backordermsg']?>
<?php } while ($row_rsSize = mysql_fetch_assoc($rsSize));
$rows = mysql_num_rows($rsSize);
if($rows > 0) {
mysql_data_seek($rsSize, 0);
$row_rsSize = mysql_fetch_assoc($rsSize);
}
?> <?php } else {?>
<?php }?>
This will show the backorder msg if onbackorder =1, that works. Now I want the message to show in the cart under the size. On the detail page in the ATC section I have
$ATC_itemBO = "".$row_rsInventoryid['backordermsg'] ."";// column binding
I used rsInventoryid, since that is what I used for the size to show in the cart. Even if I change the rs to rsSize it does not show
In the cart I have:
<?php echo $winkee->DisplayInfo("BO"); ?>
It seems no different than the way that I did the size and price vs saleprice and yet it does not show. How am I not passing the info to the cart in this case?
Tables in db used: products- has basic info ie description, category etc. inventory-has detail info ie: size, quantity, backorder, sku, barcode, prodid, catid, and some of the same info as the products table. All products are listed in the inventory table.
Well I did get something to show by changing on detail page the ATC_itemBO to$ATC_itemBO = "".$row_rsInventory['backordermsg'] ."";// column binding
But it does not discriminate by size...if I order a size that is on backorder and it shows the bo message, if I order the same prod in another size that is bo, it shows me the bo message for the size I already ordered. I can see now that the problem is that when items that have different sizes are added to the cart, in the cart they are given the same item number, even though they have different item numbers. Not sure how to handle this, so that as an item with different sizes gets their own item number posted to the cart.
When I change the binding for the item number and backorder message, they only show when I use the record set for the size to post to the cart. The items that have no size do not show the item number or the back order message. It is probably because I have the size recordset which is rsInventoryid set to the form variable. Any suggestions?
Thank you