Member Discount In Power Store
After copying and pasting the appropriate member discount snippet in dreamweaver (windows>snipets>recipes>ecartt>member discount) to ecart object. Then created the appropriate sever behavior from the bindings panel, I later proceeded to apply under the following merchant rule:
//WA eCart Merchandizing Show Start
//ecart="WA_Store_Cart"
if ($WA_Store_Cart->GetDiscounts() > 0) {
?>
<tr>
<td class="eC_SummaryLabel">Discounts</td>
<td>-<?php echo WA_eCart_DisplayMoney($WA_Store_Cart, $WA_Store_Cart->GetDiscounts()); ?></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="WA_Store_Cart"
}
?>
<?php
I Added the following merchant rule:
//WA eCart Merchandizing Show Start
//ecart="WA_Store_Cart"
if ($WA_Store_Cart->MemberPrice() > 0) {
?>
<tr>
<td class="eC_SummaryLabel">Member Discount</td>
<td>-<?php echo WA_eCart_DisplayMoney($WA_Store_Cart, $WA_Store_Cart->GetMemberPrice()); ?></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="WA_Store_Cart"
}
?>
<?php
does anyone know if this the appropriate code to apply the member discount for users who have logged in to powerstore? Any flaws in the above code?