Miva - Price Group Lookup with mvt:do
<mvt:comment><!-- Check if Customer is Wholesale --></mvt:comment>
<mvt:if expr="g.Basket:cust_id">
<mvt:do name="l.result" file="g.Module_Feature_AGR_DB" value="AvailabilityGroup_Load_Name( 'Wholesalers', l.availgroup )" />
<mvt:if expr="l.result">
<mvt:do name="l.exists" file="g.Module_Feature_AGR_DB" value="AvailGroupXCustomer_Load( l.availgroup:id, g.Basket:cust_id, l.null )" />
<mvt:if expr="l.exists">
<mvt:assign name="g.basket:customer:is_wholesale" value="1" />
</mvt:if>
</mvt:if>
</mvt:if>
<mvt:if expr="g.basket:customer:is_wholesale">
<h1>You are wholesale</h1>
<mvt:else>
<h1>You are not wholesale</h1>
</mvt:if>