close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
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 | 1892 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.

<?php
//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">
<tr>
<th>Name</th>
<th>Description</th>
<th>Item#</th>
<th>Size</th>
<th>Color</th>
<th class="eC_PriceItem" >Price</th>
<th class="eC_FormItem" >Quantity</th>
<th class="eC_PriceItem" >Total</th>
<th>Personal/Business</th>
</tr>
<?php
while (!$ecart1->EOF()) {
?>
<tr>
<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>
<?php
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());
?>
</tr>
<?php
$ecart1->MoveNext();
}
$ecart1->MoveFirst();
?>


Thanks!

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

Content

rating

Layout

rating

Ease of use

rating

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