Order Details DB Not Getting Correct 'Altered' Value
1: My order summary is dropped into a custom DB table called 'orders_ord'
2: My order details (each line item) is dropped into a custom DB table called 'orderdetail_ode'
In the 'orderdetail_ode' DB, I have a field called 'pprice_ode'. This field is suppose to store the value of a product - and it does. Sort of!
If the product has an option that increases or decreases that base value - the correct price is not stored. It stores the BASE PRICE, rather than the altered price.
EG:
1 lb of coffee = $10.00
1/2 lb of coffee = $5.00
The WA Email Receipts and cart confirmation pages all show the correct value of $5.00 for the 1/2lb. But the database is receiving the base price of $10.
On the Cart Confirm page (just before processing and emailing) and I can see it is displaying the proper "altered" price using this code:
<?php echo WA_eCart_DisplayMoney($eCart1, $eCart1->DisplayInfo("Price")); ?>
The code used to enter the value in the database looks like this:
$WA_table = "orderdetail_ode";
$WA_redirectURL = "";
$WA_indexField = "idord_ode";
$WA_fieldNamesStr = "idord_ode|pid_ode|pquantity_ode|pname_ode|pproperties_ode|pprice_ode";
$WA_fieldValuesStr = "".((isset($_POST["OrderNumber"]))?$_POST["OrderNumber"]:"") ."" . "|" . "".$eCart1->DisplayInfo("ID") ."" . "|" . "".$eCart1->DisplayInfo("Quantity") ."" . "|" . "".$eCart1->DisplayInfo("Name") ."" . "|" . "".$eCart1->DisplayInfo("sizeDiff") ." ".$eCart1->DisplayInfo("Grind") ."" . "|" . "".$eCart1->DisplayInfo("Price") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
$WA_sql = "";
My mind is telling me this should be correct.
Any suggestions?