steveosoule
10/7/2015 - 11:26 PM

Miva - Check if Customer is in Wholesale Price Group

Miva - Check if Customer is in Wholesale Price Group

<mvt:if expr="g.Basket:cust_id">
    <mvt:do name="l.result" file="g.Module_Feature_PGR_DB" value="PriceGroup_Load_Name( 'Wholesale', l.pricegroup )" />
    <!-- Result: <mvt:eval expr="l.result"/> -->
    <mvt:if expr="l.result">
        <mvt:do name="l.is_wholesale" file="g.Module_Feature_PGR_DB" value="PriceGroupXCustomer_Load( l.pricegroup:id, g.Basket:cust_id, l.null )" />
        <!-- Exists: <mvt:eval expr="l.is_wholesale"/> -->
    </mvt:if>
</mvt:if>
​
<mvt:if expr="l.is_wholesale">
    You are wholesale
<mvt:else>
    You are not wholesale
</mvt:if>