Hide fields on Vendor 'Add New Product' form

I apologise if this is really obvious, but can anyone tell me if it's possible to remove/hide fields in the Vendor Admin Panel, under 'Add Product'?



My vendors will only be selling downloadable products, and many of the fields relate to physical products (and will make no sense to my vendors). So in the Admin Panel, I only want vendors to see relevant fields.



I also want to change the field names (or add some explanations). What file can I do this in?



Any help greatly appreciated!

id also like to know an answer to this. Id also like to know if i could remove some of the tabs and move 'files' to the general tab, again to streamline the shop into a digital download store

I would also be interested in this ability to simplify the “Add Product” page. It's not that the page is very confusing, but having the ability to move tabs or fields would be beneficial.

Hi,



Has anyone found out how to edit the fields on the “Add Product Page” ?

To change your Product field names, please use the Languages in Administration->Languages. And search here for the word and replace with your naming conventions.



To hide / Add new fields, please follow the steps below:[list=1]

[]Open the following file: root/skins//admin/views/products/update.tpl file

[
]In this file you'll be able to add / hide the fields.

[/list]

To Hide a specific field for Vendor and but not for Admin, you should use the logic like:

{if $auth.user_type=="A"} {/if}



Hope this resolves your queries. Please let me know the result.

[quote name='curribhoys' timestamp='1367486394' post='161139']

To change your Product field names, please use the Languages in Administration->Languages. And search here for the word and replace with your naming conventions.



To hide / Add new fields, please follow the steps below:[list=1]

[]Open the following file: root/skins//admin/views/products/update.tpl file

[
]In this file you'll be able to add / hide the fields.

[/list]

To Hide a specific field for Vendor and but not for Admin, you should use the logic like:

{if $auth.user_type=="A"} {/if}



Hope this resolves your queries. Please let me know the result.

[/quote]



Hey , the file have many archives.What should I do replace?



{capture name="mainbox"}
{capture name="tabsbox"}
{** /Item menu section **}
{assign var="categories_company_id" value=$product_data.company_id}
{assign var="allow_save" value=$product_data|fn_allow_save_object:"product"}
{if "ULTIMATE"|fn_allowed_for}
{assign var="categories_company_id" value=""}
{if $runtime.company_id && $product_data.shared_product == "Y" && $product_data.company_id != $runtime.company_id}
{assign var="no_hide_input_if_shared_product" value="cm-no-hide-input"}
{/if}
{if !$runtime.company_id && $product_data.shared_product == "Y"}
{assign var="show_update_for_all" value=true}
{/if}
{/if}
{if $product_data.product_id}
{assign var="id" value=$product_data.product_id}
{else}
{assign var="id" value=0}
{/if}

{* product update form *}



{** Product description section **}
{* content detailed *}
{** General info section **}
{include file="common/subheader.tpl" title=__("information") target="#acc_information"}





{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id='product' name="update_all_vendors[product]"}


{assign var="result_ids" value="product_categories"}
{hook name="companies:product_details_fields"}
{if "MULTIVENDOR"|fn_allowed_for && $mode != "add"}
{assign var="reload_form" value=true}
{/if}

{if "ULTIMATE"|fn_allowed_for}
{assign var="companies_tooltip" value=__("text_ult_product_store_field_tooltip")}
{/if}
{include file="views/companies/components/company_field.tpl"
name="product_data[company_id]"
id="product_data_company_id"
selected=$product_data.company_id
tooltip=$companies_tooltip
reload_form=$reload_form
}
{/hook}


{math equation="rand()" assign="rnd"}
{if $smarty.request.category_id}
{assign var="request_category_id" value=","|explode:$smarty.request.category_id}
{else}
{assign var="request_category_id" value=""}
{/if}


{include file="pickers/categories/picker.tpl" hide_input=$product_data.shared_product company_ids=$product_data.company_id rnd=$rnd data_id="categories" input_name="product_data[category_ids]" radio_input_name="product_data[main_category]" main_category=$product_data.main_category item_ids=$product_data.category_ids|default:$request_category_id hide_link=true hide_delete_button=true display_input_id="category_ids" disable_no_item_text=true view_mode="list" but_meta="btn"}






{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id='price' name="update_all_vendors[price]"}





{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id='full_description' name="update_all_vendors[full_description]"}



{** /General info section **}
{include file="common/select_status.tpl" input_name="product_data[status]" id="elm_product_status" obj=$product_data hidden=true}
{hook name="products:update_detailed_images"}



{include file="common/attach_images.tpl" image_name="product_main" image_object_type="product" image_pair=$product_data.main_pair icon_text=__("text_product_thumbnail") detailed_text=__("text_product_detailed_image") no_thumbnail=true}


{/hook}



{include file="common/subheader.tpl" title=__("options_settings") target="#acc_options"}
{if "ULTIMATE:FREE"|fn_allowed_for}
{$promo_class = "cm-promo-popup"}
{$disable_selectors = true}
{/if}
















{include file="common/subheader.tpl" title=__("pricing_inventory") target="#acc_pricing_inventory"}
















{if $product_data.tracking == "O"}
{include file="buttons/button.tpl" but_text=__("edit") but_href="product_options.inventory?product_id=`$id`" but_role="edit"}
{else}

{/if}










































{foreach from=$taxes item="tax"}

{foreachelse}

{/foreach}





{include file="common/subheader.tpl" title=__("seo_meta_data") target="#acc_seo_meta"}





{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id="page_title" name="update_all_vendors[page_title]"}






{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id="meta_description" name="update_all_vendors[meta_description]"}






{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id="meta_keywords" name="update_all_vendors[meta_keywords]" }





{include file="common/subheader.tpl" title=__("availability") target="#acc_availability"}

{if !"ULTIMATE:FREE"|fn_allowed_for}



{include file="common/select_usergroups.tpl" id="ug_id" name="product_data[usergroup_ids]" usergroups="C"|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}











{include file="common/subheader.tpl" title=__("extra") target="#acc_extra"}































{include file="views/localizations/components/select.tpl" data_from=$product_data.localization data_name="product_data[localization]"}




{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id="short_description" name="update_all_vendors[short_description]"}












{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id='search_words' name="update_all_vendors[search_words]"}






{include file="buttons/update_for_all.tpl" display=$show_update_for_all object_id="promo_text" name="update_all_vendors[promo_text]"}



{* /content detailed *}
{** /Product description section **}
{** Product images section **}
{* /content images *}
{** /Product images section **}
{** Shipping settings section **}
{* /content shippings *}
{** /Shipping settings section **}
{** Quantity discounts section **}
{hook name="products:update_qty_discounts"}
{include file="views/products/components/products_update_qty_discounts.tpl"}
{/hook}
{** /Quantity discounts section **}
{** Product features section **}
{include file="views/products/components/products_update_features.tpl"}
{** /Product features section **}


{hook name="products:detailed_content"}
{/hook}


{hook name="products:tabs_content"}
{/hook}
{** Form submit section **}
{capture name="buttons"}
{include file="common/view_tools.tpl" url="products.update?product_id="}
{if $id}
{$view_uri = "products.view?product_id=`$id`"|fn_get_preview_url:$product_data:$auth.user_id}
{capture name="tools_list"}
{hook name="products:update_tools_list"}
  • {btn type="list" target="_blank" text=__("preview") href=$view_uri}


  • {btn type="list" text=__("clone") href="products.clone?product_id=`$id`"}

  • {if $allow_save}
  • {btn type="list" text=__("delete") class="cm-confirm" href="products.delete?product_id=`$id`"}

  • {/if}
    {/hook}
    {/capture}
    {dropdown content=$smarty.capture.tools_list}
    {/if}
    {include file="buttons/save_cancel.tpl" but_role="submit-link" but_name="dispatch[products.update]" but_target_form="product_update_form" save=$id}
    {/capture}
    {** /Form submit section **}
    {* /product update form *}
    {hook name="products:tabs_extra"}{/hook}
    {if $id}
    {** Product options section **}

    {** /Product options section **}
    {** Products files section **}

    {** /Products files section **}
    {** Subscribers section **}

    {** /Subscribers section **}
    {/if}
    {/capture}
    {include file="common/tabsbox.tpl" content=$smarty.capture.tabsbox group_name=$runtime.controller active_tab=$smarty.request.selected_section track=true}
    {/capture}
    {hook name="products:update_mainbox_params"}
    {if $id}
    {capture name="mainbox_title"}
    {"{__("editing_product")}: `$product_data.product`"|strip_tags}
    {/capture}
    {else}
    {capture name="mainbox_title"}
    {__("new_product")}
    {/capture}
    {/if}
    {/hook}
    {include file="common/mainbox.tpl"
    title=$smarty.capture.mainbox_title
    content=$smarty.capture.mainbox
    select_languages=$id
    buttons=$smarty.capture.buttons
    adv_buttons=$smarty.capture.adv_buttons
    }




    Please help, I don't know speak english perfectly.

    You can looup for the form start markup so it should look like below:

    ```php

    {if $auth.user_type==“A”}


    ```
    and its finish markup:
    ```php

    {/if}
    ```

    If you want to experiment, you can also hide many/all fields with simple CSS display:none styles.



    You'll need to add a class to the vendor dashboard so that you don't hide them in admin as well.



    We did this successfully in our site…makes it easier to turn things back on later if you require.

    what worked for me was to hide some fields by default (since I didn't want to completely take away vendor access to the fields) by making certain sections collapsed by default.

    @buging



    What version are you running? Where in the admin console is the setting to collapse those sections by default?



    Thanks in advance…

    [quote name='ShowStuff' timestamp='1408189188' post='189710']

    @buging



    What version are you running? Where in the admin console is the setting to collapse those sections by default?



    Thanks in advance…

    [/quote]

    4.0.3. works on 4.2.1 as well.



    You have to edit the file /design/backend/templates/views/products/update.tpl

    [color=#393939]change div “class=collapse in” to “class=collapse” [/color]

    Hi,



    I tried the logic ```php if ($auth.user_type==“A”){ ```



    in the following file to reduce the product tabs displayed for vendors…



    /app/controllers/backend/products.php



    Unfortunately it did not work…anybody an idea why?



    I implemented the following logic:



    ```php if ($auth.user_type==“A”){

    $tabs = array (

    'detailed' => array (

    'title' => __('general'),

    'js' => true

    ),

    'images' => array (

    'title' => __('images'),

    'js' => true



    }

    else //do not show all tabs

    {

    } ```

    It is required to add such condition to the tab templates also

    Hi eComLabs,



    thanks for the information. Maybe a stupid question…but where are the tab templates stored?



    Thanks and kind regards

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



    Check all div tags which have ID attribute starting from content_. E.g.


    ```php


    ```

    Hi,

    How can we hide for the vendor? Like that the vendor can not adjust the bestseller on the plugins tab. You can see the comments but you can't change it. Why not bestseller?

    Any ideas?

    Enclose the div in:

    {if !$runtime.company_id}
      
      
    {/if}