Allow Vendor To Add Variant In Product ->Features

Hello,

i just came across a small problem or a lock of feature in multivendor. i was accessing the store as a vendor, i came across a small problem in product page-> features tab. The problem is, i as a admin have already added some of the features and its variants for the specific categories,



for example: admin has added a feature as BAG COLOUR and its variants as RED, blue, yellow, green etc, but what if vendors BAG COLOUR is “maroon”, so he wont be able to add the variant.



from the admin side, admin gets an option as “enter other” in the variant dropdown, where he can enter a new variant in the product page → feature tab itself. i want this “enter other” option available for vendors too. It is not possible for admin to input all the existing colours into the variant tab. nor vendor can contact admin each and every time when he wants to add new variant. please help me out with this.



Have a look at the below attachments:

1st image is from the admin side and 2nd image from vendor side.

i have highlighted the problem



where i need to change the code or set vendor permission?

admin.png

vendor.png

Dear Pratik1992,



Code modification is required here.

Maybe other third-party developers could post it here as we are quite busy today.



Best regards, Alt-team.

thanks for the reply, if possible please update me with the modifications when ever u free

[quote name='pratik1992' timestamp='1418290352' post='199451']

thanks for the reply, if possible please update me with the modifications when ever u free

[/quote]



The solution is simple. Open the app\controllers\backend\product_features.php file and replace this part of code:



if (!Registry::get('runtime.company_id') || (fn_allowed_for('ULTIMATE') && fn_check_company_id('product_features', 'feature_id', $_REQUEST['feature_id']))) {




with this one:



if (fn_allowed_for('MULTIVENDOR') || (fn_allowed_for('ULTIMATE') && fn_check_company_id('product_features', 'feature_id', $_REQUEST['feature_id']))) {

[quote name='eComLabs' timestamp='1418292854' post='199460']

The solution is simple. Open the app\controllers\backend\product_features.php file and replace this part of code:



if (!Registry::get('runtime.company_id') || (fn_allowed_for('ULTIMATE') && fn_check_company_id('product_features', 'feature_id', $_REQUEST['feature_id']))) {




with this one:



if (fn_allowed_for('MULTIVENDOR') || (fn_allowed_for('ULTIMATE') && fn_check_company_id('product_features', 'feature_id', $_REQUEST['feature_id']))) {


[/quote]





thansk ecom labs for the reply…i did the changes as mentioned by you but enter_other option dint work…ny idea, what can be the issue?

[quote name='eComLabs' timestamp='1418292854' post='199460']

The solution is simple. Open the app\controllers\backend\product_features.php file and replace this part of code:



if (!Registry::get('runtime.company_id') || (fn_allowed_for('ULTIMATE') && fn_check_company_id('product_features', 'feature_id', $_REQUEST['feature_id']))) {




with this one:



if (fn_allowed_for('MULTIVENDOR') || (fn_allowed_for('ULTIMATE') && fn_check_company_id('product_features', 'feature_id', $_REQUEST['feature_id']))) {


[/quote]

hello, ecom labs, i just check it out on my other domain and applied the code and it worked correctly…but i dnt knw why it is not working on this domain? what can the issue be?

Dear Pratik1992,



Have you got any third-party add-ons related with product_features?



Best regards, Alt-team.

[quote name='Alt-team' timestamp='1418303177' post='199489']

Dear Pratik1992,



Have you got any third-party add-ons related with product_features?



Best regards, Alt-team.

[/quote]

no…there are no addons as such…can u check what is the issue…i can giv u ftp details

We fixed it on your server. Please take a look

[quote name='eComLabs' timestamp='1418312454' post='199504']

We fixed it on your server. Please take a look

[/quote]

thank u very much for the help…hats off to the developers

[quote name='eComLabs' timestamp='1418312454' post='199504']

We fixed it on your server. Please take a look

[/quote]

can u tell me what was the issue

All the changes made in the same file. Please check

[quote name='eComLabs' timestamp='1418389575' post='199605']

All the changes made in the same file. Please check

[/quote]

great…thanks a lot

Hi,

May i Know how to fixed it?

Thank You

May i Know how to fixed it?

Frankly speaking, I do not remember. If you provide us with the temporary FTP access, we can help you to implement this feature

All you need to do in the latest versions is to open the design/backend/templates/views/products/components/product_assign_features.tpl file and replace

{$allow_enter_variant = $feature|fn_allow_save_object:"product_features"}

with

{$allow_enter_variant = true}

Hope this will help

Hello eComlabs,

Can you suggest me the way in latest version. How can vendors add variants in product.

Thanks in advance!

Best,

darpan

Try solution from post #16. Most possibly it will work on the latest version as well

Hello,

Thank your your reply.

I tried suggested option but it didn't work. Please help me.

Darpan

Hello,

Thank your your reply.

I tried suggested option but it didn't work. Please help me.

Darpan

It works on my local installation. Please PM me temporary FTP access so that we can check it