Vendor option productlimitation by ACL

  • Posts: 48
  • Thank you received: 0
8 years 10 months ago #204321

-- HikaShop version -- : 2.5.3
-- HikaMarket version -- : 1.6.2
-- Joomla version -- : 3.4.1

Hi,

I set up different productlimitation by ACL under access/vendor options, but it doesn´t work. When I set up a limitation in the general configuration I have no problems. So I need to set the limitation for different vendorgroups with different ACLs. How I can handle this? Why the vendor option doesn´t work?

thx

Please Log in or Create an account to join the conversation.

  • Posts: 26008
  • Thank you received: 4004
  • MODERATOR
8 years 10 months ago #204341

Hi,

Would it be possible to have more details about the vendor configuration (his groups) and the configuration of your vendor limitations ?

The product limitation value is returned by the function "checkProductLimitation" in the HikaMarket vendor class.
That function call the "config->vendorget" in order to get the value in the Vendor accesses depending the vendor groups
I have to perform some new tests but I do not see major modifications since the addition of the feature so your issue is interesting.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 48
  • Thank you received: 0
8 years 10 months ago #204482

Hi,

I have two groups for the vendors with different limitations ( Künstler basic and Künstler Premium). Both are selected under a maingroup (Künstler). I set up the limitations for the vendor groups in the vendor options and not in the general settings of hikamarket. With this settings nothing happen. Than I try to set up the limitation by the general settings of hikamarket. If I test this configurations I get the the limitation from the general settings but the limitation from the vendor options doesn´t work. Do you have an idea?

I send you a PM with the access for the backup... Maybe I setup something wrong...

thx

Please Log in or Create an account to join the conversation.

  • Posts: 26008
  • Thank you received: 4004
  • MODERATOR
8 years 10 months ago #204498

Hi,

Thanks for the access.
I see that you do not have product limitation in your HikaShop configuration, so I think that's why the check is not processed correctly.
Can you please edit the file "administrator/components/com_hikamarket/classes/vendor.php" and replace

if($vendor_id > 1 && ($config_limitation > 0 && $vendor_limitation >= 0) || $vendor_limitation > 0) {
Into
if($vendor_id > 1 && ($vendor_limitation > 0 || $config_limitation > 0)) {
It should fix the issue.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 48
  • Thank you received: 0
8 years 10 months ago #204505

Hi Jerome,

I try your code but it shouldn´t fix the issue. I don´t see where the code check the ACL... Is that the problem?

Please Log in or Create an account to join the conversation.

  • Posts: 26008
  • Thank you received: 4004
  • MODERATOR
8 years 10 months ago #204510

Hi,

In the HikaMarket class product, for the function "frontSaveForm"

	if($vendorClass->checkProductLimitation($vendor) !== true)
		return false;
That code call the vendor class in order to know if the vendor have the right to create one more product.
And in the function "checkProductLimitation" you will find the line
$vendor_limitation = $config->vendorget($vendor, 'product_limitation', 0);
which will read the value in the vendor accesses for the current vendor.

So it requires some more deep tests in order to reproduce the issue and find the right fix.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 26008
  • Thank you received: 4004
  • MODERATOR
8 years 10 months ago #204599

Hi,

I performed new tests on a new website and I realized that I had "wrong" configuration in my test site (so I cleaned it).
Please replace in the file "administrator/components/com_hikamarket/classes/config.php"

$access = $this->get('vendor_options_opt_'.$group->id, '');
By
$access = $this->get('vendor_options_acl_'.$group->id, '');
You can also keep the previous modification.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 48
  • Thank you received: 0
8 years 10 months ago #204609

the problem is solved
thanks a lot!
regards

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.066 seconds
Powered by Kunena Forum