How does trade_price work?

  • Hi all,


    Could someone explain to me how to get trade_price working.


    I'm wanting to use trade_price as a way to show discounted prices for members.


    So I have a test product with a trade price, as well as a normal price.


    In the trmplate I'm using if/else to show trade_price if it exists or main price. This shows the trade price.


    At the top of each page, I'm checking if the user is logged in and has a member tag if full.


    The cart is where I'm having an issue, the item price is correct, but the total shows the main price, not the trade price. but there isn't a trade_price_total I can use - is there?


    PHP: cart.html
    1. <perch:if exists="trade_price">
    2. <perch:cartitem id="trade_price" type="shop_currency_value" />
    3. <perch:else />
    4. <perch:cartitem id="price" type="shop_currency_value" />
    5. </perch:if>


    PHP: product.html
    1. <perch:if exists="trade_price">
    2. <perch:shop id="trade_price" type="shop_currency_value" />
    3. <perch:else />
    4. <perch:shop id="price" type="shop_currency_value" />
    5. </perch:if>


    PHP: product.php, cart.php and checkout.php
    1. <?php include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php');
    2. perch_layout('global.header');
    3. if (perch_member_logged_in() && perch_member_has_tag('full')) {
    4. perch_shop_enable_trade_pricing();
    5. }
    6. ?>


    What am I missing?


    This is the cart: