Is there any way or an addon to give vendors a discount when purchasing from other vendors? For example, regular customers can be added to a user group (say Gold Members), and then a vendor can create a product discount in the Quantity Discounts tab for any customers that belong to the Gold Member group gets whatever discount is defined. However, I haven’t found a similar functionality that would allow a vendor to give product discounts to other vendors on the marketplace belonging to a particular group - basically a B2B discount for vendors purchasing from other vendors. Can this be done?
Thanks! That worked out great. In the add-on description it shows it’s compatible only up to version 4.17.2.SP2, but I’m using 4.18.3 and it still worked. There’s a warning message in the Information Tab → Compatibility: The add-on requires 4.17.2.SP2 version.
Not sure if there’s any plans to update the version compatibility.
I noticed that when editing a product and you go to select a user group when setting a price value, it brings up ALL of the vendor user groups, even vendor user groups that I have hidden (which if it’s hidden, it should probably be hidden from vendors too?)
Just my feedback. Otherwise it works great and was just what I needed.
I’m glad to hear that this add-on works for you. And glad to hear that it works well with 4.18.3, we’ll update its properties on the Marketplace
As for the hidden groups, its working this way on a purpose. However, if you’d like to hide the hidden usergroups for the vendors, please make these changes in the app/addons/vendorgroup_promotion/func.php:
Replace this code:
$where = db_quote(
' a.status IN (?a) AND a.type = ?s',
[ObjectStatuses::ACTIVE, ObjectStatuses::HIDDEN],
USERGROUP_TYPE_VENDOR
);
with this code:
if (UserTypes::isVendor(Tygh::$app['session']['auth']['user_type'])) {
$statuses = [ObjectStatuses::ACTIVE];
} else {
$statuses = [ObjectStatuses::ACTIVE, ObjectStatuses::HIDDEN];
}
$where = db_quote(
' a.status IN (?a) AND a.type = ?s',
$statuses,
USERGROUP_TYPE_VENDOR
);
I edited the func.php file as instructed, but I’m sorry to say that it didn’t change the User Groups that were populated in the list and still showed all of the hidden vendor and customer accounts. During my testing, the first thing I do is to create a copy of the original file as backup, then edit the original file. I deleted the cache folder, used the clear cache button while in the admin account, cleared out my browers cache and cookies, I even disabled/enabled the add-on and also ran the uninstall/install for the module and nothing changed in the list. When I changed a user group (customer and vendor) from hidden to disabled, it disappeared from the user group list, and when I changed the user group from disabled back to hidden, it reappeared. Oddly enough, to see what would happen I decided to rename the func.php to func_MOD.php (and my copy is named func_ORIG.php) so in the directory there no longer contained a file named func.php This didn’t break the module and still showed all of the user groups in the list. It’s as though func.php wasn’t even getting looked at…
I can assume that it is either some sort of server side caching is enabled. Could you please contact your hosting and ask them to disable server side caching at least temporary? OPCache, for example.