Forum

Thread tagged as: Question, Members, Shop

Dynamic Member Tags on Checkout

Quick question,

On my site we are offering separate courses for users at various prices. I was going to put the content of these courses behind a paywall that is only accessible via a members tag.

I realise I need to add the perch_member_add_tag to the result master page

something like

if (perch_shop_order_successful()) {

// Yes! Show a success message
perch_content('Order successful');

// Redisplay the details of the order
perch_shop_order_items(
    perch_shop_successful_order_id()
);

perch_member_add_tag('TAG HERE');

perch_shop_empty_cart();

}

This sounds straight forward, what I cant figure out is how to add a member tag based on the course they buy, i.e Dynamic Tags.

Any ideas how I would go about this?

Barry Corrigan

Barry Corrigan 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You don't need to do anything in code as this functionality is already built into Shop.

Under Product, go to Tags and then you can set tags to add on Purchase. I described this in the blog post here https://grabaperch.com/blog/archive/selling-content-behind-a-paywall-using-perch

Ahh ok thanks.