Column bindings
Hi,
Im working on trying to get my eCart to calculate an addition to the price of one of my items based on how many fields in a certain recordset are empty, this number will multiply the increase in price that comes when increasing the size of the item
I have already put a formula into my cost calculation on the set up for my ecart and have bound the increase in price to my dropdown which selects the size
I have also manually set up a small php script to determine the multiply value which will count how many fields out of 5 are not empty, the number is then stored in a variable, the script is
<?php
//Colour counter
$ColourCount = 0;
for ($i=1; $i<=5; $i++) {
if ($row_WADAproducts["ProductFabric".$i."ID"] != "") {
$ColourCount++;
}
}
?>
What im having trouble doing (as im no PHP expert) is how can i tell my 'add to cart' button, that the binding for my column [ColourMultiply] is the variable $ColourCount, i tried entering
<?php echo $ColourCount; ?>
into the binding field but that doesnt seem to be working, how can i tell my ecart i want to bind this column to that variable?
Many thanks