Forum

Thread tagged as: Question, Shop

Trade / Member Price

Is there any documentation for Trade / Member price

what i want to achieve is if a member has a Tag use Trade Price / Member Price on one product only

Members or Trade will have a cheaper price

ive seen the method of using a discount code but i cant see a setting to make the discount code only apply to a particular product

Anthony Elleray

Anthony Elleray 2 points

  • 5 years ago

Hi Anthony,

I have done this. You do it by checking a member tag then switching out the pricing. For my site it is for all products but could be done for just one. This is at the top of my page:

<?php
  if (perch_member_logged_in() && perch_member_has_tag('trade')) {
      perch_shop_enable_trade_pricing();
?>

And this switches the price on the product page:

<perch:if id="trade_pricing" value="1">
        <perch:shop id="trade_price" type="shop_currency_value" label="Price" />
                <perch:else />
        <perch:shop id="price" type="shop_currency_value" label="Price" />
        </perch:if>

Does this help at all?

I will try it

what happens when no trade price is set ? but member is logged in with the tag

Err I don't know - I think it will go to 0.00, so be careful! Probably good to put an if statement in there to make sure

also what happens is when you logout trade prices are still enabed

So i log in and it enables the price but if i log out again its still trade price

is there a

 perch_shop_disable_trade_pricing(); 

Mike Harrison said:

Hi Anthony,

I have done this. You do it by checking a member tag then switching out the pricing. For my site it is for all products but could be done for just one. This is at the top of my page:

<?php
 if (perch_member_logged_in() && perch_member_has_tag('trade')) {
     perch_shop_enable_trade_pricing();
?>

And this switches the price on the product page:

<perch:if id="trade_pricing" value="1">
      <perch:shop id="trade_price" type="shop_currency_value" label="Price" />
              <perch:else />
      <perch:shop id="price" type="shop_currency_value" label="Price" />
      </perch:if>

Does this help at all?

This works perfectly

but when i log out i still see trade prices and if i add to basket it wont work

is there a way to disable trade price on logout