Hide Some Fields From Vendors

Hello

I Want to hide some fields from vendors when the vendor add or edit product.

pricing \ inventory

availiblity

extra

and other options

can any one help me please.

i add picture that i want to hide fields from.

thanks [font=-apple-system][size=3]





[/size]

5]







[center]





[b]
[/center]

Drop images to upload[/b]


or
[size=1]
Select image[/size] [/font] Pricing / inventory

It is required to change product template in this case

design/backend/templates/views/products/update.tpl

The following condition can be added

{if $smarty.const.ACCOUNT_TYPE != 'vendor'}
    ....
{/if}

If you are familiar with hooks, try to use hooks in this file

It is required to change product template in this case

design/backend/templates/views/products/update.tpl

The following condition can be added

{if $smarty.const.ACCOUNT_TYPE != 'vendor'}
    ....
{/if}
If you are familiar with hooks, try to use hooks in this file

Thanks for your answer.
Im try many ways but i faild i tried to override templeate in my_changes addon but didnt work so could you help me more.
When exactly i paste this code i want you to guide me please.
Thanks again

Thanks for your answer.
Im try many ways but i faild i tried to override templeate in my_changes addon but didnt work so could you help me more.
When exactly i paste this code i want you to guide me please.
Thanks again

Hello!

First try to edit the design/backend/templates/views/products/update.tpl file itself. If it is not changed after clearing cache, then look for the add-ons that can override this file.

For example, availability section looks like this (I do not now your version but it should be similar):

{include file="common/subheader.tpl" title=__("availability") target="#acc_availability"}
{if !"ULTIMATE:FREE"|fn_allowed_for}
{__("usergroups")}:
{include file="common/select_usergroups.tpl" id="ug_id" name="product_data[usergroup_ids]" usergroups=["type"=>"C", "status"=>["A", "H"]]|fn_get_usergroups:$smarty.const.DESCR_SL usergroup_ids=$product_data.usergroup_ids input_extra="" list_mode=false}
{/if}
{include file="common/calendar.tpl" date_id="elm_date_holder" date_name="product_data[timestamp]" date_val=$product_data.timestamp|default:$smarty.const.TIME start_year=$settings.Company.company_start_year}
{include file="common/calendar.tpl" date_id="elm_date_avail_holder" date_name="product_data[avail_since]" date_val=$product_data.avail_since|default:"" start_year=$settings.Company.company_start_year}

And you need to change it by adding condition like this:

{if $smarty.const.ACCOUNT_TYPE != 'vendor'}
    {include file="common/subheader.tpl" title=__("availability") target="#acc_availability"}
    
{if !"ULTIMATE:FREE"|fn_allowed_for}
{__("usergroups")}:
{include file="common/select_usergroups.tpl" id="ug_id" name="product_data[usergroup_ids]" usergroups=["type"=>"C", "status"=>["A", "H"]]|fn_get_usergroups:$smarty.const.DESCR_SL usergroup_ids=$product_data.usergroup_ids input_extra="" list_mode=false}
{/if}
    
{include file="common/calendar.tpl" date_id="elm_date_holder" date_name="product_data[timestamp]" date_val=$product_data.timestamp|default:$smarty.const.TIME start_year=$settings.Company.company_start_year}
{include file="common/calendar.tpl" date_id="elm_date_avail_holder" date_name="product_data[avail_since]" date_val=$product_data.avail_since|default:"" start_year=$settings.Company.company_start_year}

{/if}

And modify all necessary fields this way.