close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Auto Deduct Inventory

Thread began 8/12/2010 9:59 am by jbarron397794 | Last modified 4/05/2011 2:51 pm by jbarron397794 | 2066 views | 3 replies

jbarron397794Beta Tester

Auto Deduct Inventory

Hi, I now have all of my products auto deducting from the database except for when there are different colors and sizes for the shopper to choose from. This is all being done from the "Checkout_Success" page.

I am pasting the code that is allowing me to do this and I am hoping someone can help me with my size/color issue.

//WA eCart Show If Start
if (!$ecart1->IsEmpty()) {
<h2>Order Receipt</h2>
<h3 class="eCart_OrderHeaderInfo">Order number: <?php echo ((isset($_SESSION["ecart1_OrderID"]))?$_SESSION["ecart1_OrderID"]:"") ?></h3>
<p class="eCart_OrderHeaderInfo">Thank you for your order. Please allow 5 - 7 business days for delivery.</p>
<table class="eC_ShoppingCart" border="0" cellspacing="0" cellpadding="0">
<th class="eC_PriceItem" >Price</th>
<th class="eC_FormItem" >Quantity</th>
<th class="eC_PriceItem" >Total</th>
while (!$ecart1->EOF()) {
<td><?php echo $ecart1->DisplayInfo("Name"); ?></td>
<td><?php echo $ecart1->DisplayInfo("Description"); ?></td>
<td><?php echo $ecart1->DisplayInfo("ID"); $idCall = $ecart1->DisplayInfo("ID");?>
<td><?php echo $ecart1->DisplayInfo("Size"); ?></td>
<td><?php echo $ecart1->DisplayInfo("Color"); ?></td>
<td class="eC_PriceItem" ><?php echo WA_eCart_DisplayMoney($ecart1, $ecart1->DisplayInfo("Price")); ?></td>
<td class="eC_FormItem" ><?php echo $ecart1->DisplayInfo("Quantity"); $solditems = $ecart1->DisplayInfo("Quantity") ?></td>
<td class="eC_PriceItem" ><?php echo WA_eCart_DisplayMoney($ecart1, $ecart1->DisplayInfo("TotalPrice")); ?></td>
<td class="eC_FormItem" ><?php echo $ecart1->DisplayInfo("Personal"); ?></td>
mysql_select_db($database_rsmyconnect, $rsmyconnect);
$query_itemQ = "Update inventory SET inventory.itemQty = inventory.itemQty -
$solditems WHERE inventory.itemId = $idCall";
$itemQ = mysql_query($query_itemQ, $rsmyconnect) or die(mysql_error());


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





Ease of use


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