Public Ticket #4039726

Single Product Multiple Vendors

Closed
Comments
56 Tickets 59
Anthony O Connell started the conversation 1 year ago on June 8, 2025 at 10:29pm

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,762
KingsPlugins replied 1 year ago on June 13, 2025 at 5:39pm

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

1
56 Tickets 59
Anthony O Connell replied 1 year ago on June 13, 2025 at 7:50pm

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:

2,762
KingsPlugins replied 1 year ago on June 25, 2025 at 7:54pm

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

1
56 Tickets 59
Anthony O Connell replied 1 year ago on June 26, 2025 at 7:54pm

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:

2,762
KingsPlugins replied 1 year ago on July 9, 2025 at 4:11pm

Hi Anthony,

That is a PHP code snippet,

To lock duplicate products, this would require some customization of the products.php (main list view) and/or edit-product.php (single product edit view) files. It's definitely possible to restrict the available buttons there and only show 'view product'.

If your developer has any questions about implementing locking products, let us know and we can provide more guidance,

Kind regards,
Stefan

 

1

Sign In