I'm working on my first Miva module, in general everything is fine, but I can't get the system to call the `DiscountModule_Discount_Items` function. On paper it looks like I'm doing everything correctly, but I must be missing something.
My goal is for this function to be called whenever the BASK screen is loaded, so I can loop through all items in the basket and apply any necessary discounts. Here's the relevant code, any idea what I might be doing wrong?
None of the output is ever printed to the screen, and the `UpdatePrices` function is never called...
My goal is for this function to be called whenever the BASK screen is loaded, so I can loop through all items in the basket and apply any necessary discounts. Here's the relevant code, any idea what I might be doing wrong?
Code:
<mvFunction name="Module_Description" parameters="module var" standardOutputLevel=""> ..... <mvAssign name="l.module:api_ver" value="5.00"> <mvAssign name="l.module:features" value="discount, system, vis_system, component, data_store"> </mvFunction> <mvFunction name="DiscountModule_Capabilities" parameters="module var, capabilities var" standardOutputLevel=""> <mvEval expr="{'<br><b>DiscountModule_Capabilities function called</b>'}"><br> <mvAssign name="l.capabilities:items" value=1> <mvAssign name="l.capabilities:basket" value=0> <mvAssign name="l.capabilities:tax" value=0> <mvAssign name="l.capabilities:shipping" value=0> <mvAssign name="l.capabilities:provision_settings" value=0> </mvFunction> <mvFunction name="DiscountModule_Discount_Items" parameters="module var, pricegroup var, discount_state var" standardOutputLevel=""> <mvEval expr="{'<br><b>DiscountModule_Discount_Items function called</b>'}"><br> <mvEval expr="{UpdatePrices()}"> <mvFunctionReturn value="0"> </mvFunction>
Comment