Okay
  Public Ticket #4039726
Single Product Multiple Vendors
Open

Comments

  •  56
    Anthony O Connell started the conversation

    Hi guys.

    I recently just activated the 'Single Product Multiple Vendor' module.

    I want vendors to sell some of my products but my concern is that  afraid vendors may edit or change their product and it won't match my original product.

    Is there a way via PHP code snippet that we could lock certain products from been edited by vendors?

    Thank you.

  •  2,460
    WebWizards replied

    Hi Anthony,

    Yes, with the Single Product Multiple Vendor module, vendors can typically edit their version of the product. However, I understand your concern about wanting to maintain consistency with the original product.

    While there isn't a built-in setting for this, you could implement this restriction by customizing the edit-product.php template in your child theme. You would need to add custom code there to lock specific product fields or prevent certain products from being edited altogether.

    Here's the general approach you would need to take:
    1. Create a child theme if you haven't already
    2. Create an edit-product.php template in your child theme
    3. Add custom code to implement the restrictions you need

     

    Kind regards,
    Stefan

  •  56
    Anthony O Connell replied

    Hi Stefan.

    Thanks for getting back to me.

    Will one piece of code do all products or do we have to do a separate piece of code for each product? 

    I only want to lock the duplicates of my products but how do we ensure vendors can duplicate other vendors products without those duplicates been locked?


    Also, i have just noticed a problem in my products tab in my vendor dashboard. The text editor tabs are gone missing in the short and long description panels and the text is in html here. Currently we have a code snippet that auto fills in the product descriptions here: https://flexitime.ie/wp-admin/admin.php?page=wpcode-snippet-manager&snippet_id=17208

    Would this be causing an issue?

    Regards

    Anthony 

    Attached files:  Missing text editor.png

  •  56
    Anthony O Connell replied

    Hi Stefan.

    Is it also possible to hide the ''Add products to my store'' button as I do not want vendors copying my products and by passing my commissions.

    Thanks

    Attached files:  Hide 'add product to my store'.png

  •  2,460
    WebWizards replied

    Hi Anthony,

    You can hide the "Add to my store" button using the following code snippet:

    add_filter('marketking_add_product_to_my_store_enable','__return_false');

    Regarding the missing text editor tabs in the product descriptions - I'd suggest temporarily deactivating all your snippets to check if that resolves the issue. If it does, could you please share the code of the snippet that's causing this?

     

    I tried accessing the site to check directly but I'm currently seeing an error (https://prnt.sc/4el0xwV4abSq) - this might be due to my connection. 

     

    As for your earlier questions about locking products:
    - One piece of code can handle all products
    - To only lock duplicates of your products while allowing vendors to duplicate other vendors' products, we'd need to check the original product author

     

    Stefan

  •  56
    Anthony O Connell replied

    Hi Stefan.

    Thanks for the code snippet. Is that a css code or php?

    I have my developer now going to look at the tab issue and hopefully I can get it resolved.

    Regarding the login, I changed the password so if you want to message privately, I can give you access again.

    I wonder is it possible to lock a duplicate product in the vendor dashboard (Please see screenshot) and when a vendor goes to click on the product, then nothing happens and they stay on that screen. Maybe they can click the 3 dots on the right and they can only 'view product' from the drop down menu. Is this possible?  

     Thanks for your help.

    Attached files:  Lock duplicate product.png