How To Stop Vendor From Deleting Products?

Hi,

In Multi-vendor edition; how can we prevent the vendor from deleting products from his store?

Thanks

This will eventually be sorted out in the 4.10.x release

This will eventually be sorted out in the 4.10.x release

Great! thanks for sharing that .. any idea when it will be released ?

Great! thanks for sharing that .. any idea when it will be released ?

Next release will be either 4.9.3 or 4.10.1 so you should have already upgraded to 4.9.2 SP3.

Great! thanks for sharing that .. any idea when it will be released ?

If you looking for an instant solution, please follow below.

Go To: app/functions/fn.catalog.php

function fn_delete_product($product_id)
{
if($_SESSION['auth']['user_type'] == 'V') {
    return false;
}

$status = true;
/**
.
.
.

To hide delete option for the vendor.

{capture name="tools_list"}
    {hook name="products:list_extra_links"}
        
  • {btn type="list" text=__("edit") href="products.update?product_id=`$product.product_id`"}
  • {if !$hide_inputs_if_shared_product && $auth.user_type == 'A'}
  • {btn type="list" text=__("delete") class="cm-confirm" href="products.delete?product_id=`$product.product_id`" method="POST"}
  • {/if} {/hook} {/capture}

    Where you want to hide just add $auth.user_type == 'A'

    Thanks

    Where you want to hide just add $auth.user_type == 'A'

    Thanks for the tip! Is there a way to hide something from a certain user group, not user type? For instance some admin's managers have the permission to export and import products. As there is no way to separate export from import permission, so far, can we hide the Export link in the menu for this group of managers?

    Just as precaution measure... ;-)

    Thanks for the tip! Is there a way to hide something from a certain user group, not user type? For instance some admin's managers have the permission to export and import products. As there is no way to separate export from import permission, so far, can we hide the Export link in the menu for this group of managers?

    Just as precaution measure... ;-)

    Sure, use

    {if !123|in_array:$auth.usergroup_ids}
       .....
    {/if}
    

    where 123 - is the ID of required user group (can be found in the admin panel)