Display Links By Vendor Plan

Is there a simple way to display content according to the vendor plan?

Something like:

{if $auth.user_type == 'V' && vendor_plan == 'Gold'}
display content

Do you want to display it in the vendor store or all pages?

Do you want to display it in the vendor store or all pages?

The content should be viewable for logged-in vendors according to their plan, so I guess anywhere. If it's only possible in their store, then I'll accept that.

You can use the following code on the vendor store page

{if $auth.user_type == 'V'}
    {$company_data = $smarty.request.company_id|fn_get_company_data}
    {if $company_data.plan_id == 123}
        display content

where 123 - is the ID of the required plan

Do you know how to get the current plan id of the vendor inside a tpl file or using smarty?

I tried your code to create a condition based on vendor plan inside the product creation page (update.tpl) but couldnt make it work.

The code should work. Have you cleared cache after the changes were applied?

Yes, I cleared the cache, but seems not to be working.

I am trying to modify the following file:


All my others changes in this file are working, except the code to check vendor plan. I tried to print the variable to check what information is being generated and for all vendors the value returned is 1, independently of their vendor plan.

I tried to check the variable with {$company_data.plan_id|@print_r} and result is always 1 even with vendor from different plans.

For the update product page please try

{$company_data = $product_data.company_id|fn_get_company_data}