ecart 4.5.2 rewriting postage and tax rules :-(
Hi there
i entered a postage rule and in the code it was:
<%
function WAEC_eCart1_PostninaPravne2()
totalShipping = 0
if (true AND ((cStr(Session("tip")) = "1") AND (WA_eCart_TotalColumn(eCart1, "Quantity") > 5))) then
totalShipping = totalShipping + 1.67'Result
end if
WAEC_eCart1_PostninaPravne2 = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>
The next time I opened GUI and this discount it said Custom rule :-( What is worse is every time I open GUI and chang something so that eCart1_VB gets rewritten, I get this in the postage, which makes error in page:
<%
function WAEC_eCart1_PostninaPravne2()
totalShipping = 0
if (true AND ((WA_eCart_ConditionalTotal(eCart1, "Quantity", "Tax", "0,2") > 0) or cDBL(WAEC_eCart1_PostninaPravne2()) or cDBL(WAEC_eCart1_PostninaPravne1()) )) then
'Result
end if
WAEC_eCart1_PostninaPravne2 = WA_eCart_FormatNumber(totalShipping, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>
It is rewriting some other rules as well, like discount rules. I know if I change something in the source code it get's rewritten but this are standard rules I set using GUI only.
Another thing is I made a custom variable names test and I haven't included it in any calculation. Now using the WA_eCart_ConditionalTotal in discount it is not listed in GUI at all. I have to manually correct it in the code and it works. Until next time I open GUI and is lost again to the other fiesd that exists.
I hate opening GUI now :-(