Hello,
So here's the deal. Discounts are setup for product groups. To capture the discount in a variable I go to the discount configuration and enable the option to print the discount msg against each product. The discount is just a figure (ie for the 25% off discount group, I put 25). Then I go to the standard discount layout, comment out the part where it ouputs the discount message. I instead assign it to a variable (in a php block).
$discount= "<Actinic:Variable Name="DiscountInfo"/>";
The aim here is to display the price minus the discount next to the normal price. Straightfoward enuff.
However, the aforementioned variable is a string. To perform my little calculations, in the price layout, I need an int. And every attempt to convert that data to an int is failing (always giving me a zero).
I don't get it.
$d = (int)$discount;
$d = 0 + $discount;
just don't do it.
So here's the deal. Discounts are setup for product groups. To capture the discount in a variable I go to the discount configuration and enable the option to print the discount msg against each product. The discount is just a figure (ie for the 25% off discount group, I put 25). Then I go to the standard discount layout, comment out the part where it ouputs the discount message. I instead assign it to a variable (in a php block).
$discount= "<Actinic:Variable Name="DiscountInfo"/>";
The aim here is to display the price minus the discount next to the normal price. Straightfoward enuff.
However, the aforementioned variable is a string. To perform my little calculations, in the price layout, I need an int. And every attempt to convert that data to an int is failing (always giving me a zero).
I don't get it.
$d = (int)$discount;
$d = 0 + $discount;
just don't do it.
Comment