Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Vendor Permissions For Addon Rate Topic   - - - - -

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11110 posts

Posted 10 January 2019 - 07:26 PM #1

I'm a bit stumped.  On my development systems, all is well.  On one client's site, vendors can't access my license_keys addon.
I have the cscart_permissions table updated with manage_license_keys = Y
and I have an approprate app/addons/license_keys/schemas/permissions/vendor_multivendor.post.php file with content of:
 

$schema['controllers']['license_keys'] = array (
    'permissions' => true,
);
 
return $schema;

But for whatever reason, attempts to access the addon while in the context of a vendor fails with a 404.

Any thoughts/insights?
Yes, there is a related admin.post.php file in schema/permissions.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 467 posts

Posted 11 January 2019 - 06:16 AM #2

Perhaps share the software stack of your client? PHP Version, enabled modules, etc.


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18650 posts

Posted 11 January 2019 - 06:30 AM #3

Please check vendor_multivendor.post.php file in 3rd party addons. Perhaps, one of them does not contain return $schema; at the end


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11110 posts

Posted 11 January 2019 - 07:29 PM #4

Perhaps share the software stack of your client? PHP Version, enabled modules, etc.

 

 

Please check vendor_multivendor.post.php file in 3rd party addons. Perhaps, one of them does not contain return $schema; at the end

 

 

PHP 7.2.10

4 3rd party addons (other than mine).

- Blue Rabbit (never heard of it) Looks locally developed

- FraudLabs Pro

- Simtech Master Products (disabled)

- Virtual Wallet also looks locally developed.

 

I turned off the two local addons and it worked.  So I'll let the client know and either have them address or I'll look into the issue for them.

 

Appreciate the quick responses...


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11110 posts

Posted 11 January 2019 - 08:44 PM #5

Just FYI.  I took a look at one of these addons and they are setting the $shema directly and re-doing all the permissions.  I.e.

$schema = array( ....)

rather than things like

$schema['controllers']['addon'] = array(...)

 

So if their addon priority is higher than mine, their 'post' schema ill wipe out any definitions that have come before it.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18650 posts

Posted 14 January 2019 - 05:59 AM #6

Thank you for sharing the solution. I was sure the problem is caused by 3rd party addon


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11110 posts

Posted 14 January 2019 - 09:10 PM #7

Yep, and the client has gone on vacation! :-)

It's awesome that developers can work together here in a cooperative manner.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 222 posts

Posted 15 January 2019 - 07:48 AM #8

 I took a look at one of these addons and they are setting the $shema directly and re-doing all the permissions.  I.e.

$schema = array( ....)

rather than things like

$schema['controllers']['addon'] = array(...)

So if their addon priority is higher than mine, their 'post' schema ill wipe out any definitions that have come before it.

 

Thank you and @eComLabs for your insights. I have a similar case with a fourth-party addon. It adds tabs for the vendor store but while doing that it wipes out the vendor's permissions set by another addon, Vendor Plans (vendor_plans)

 

Here is what I found in the said .php

$schema['controllers']['vendor_tabs'] = array ('permissions' => true);
$schema['controllers']['tools']['modes']['update_status']['param_permissions']['table']['vendor_tabs'] = true;
return $schema;


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18650 posts

Posted 15 January 2019 - 01:31 PM #9

It looks correctly since it adds new elements and does not override the whole schema


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 222 posts

Posted 15 January 2019 - 01:37 PM #10

It looks correctly since it adds new elements and does not override the whole schema

 

The original vendor_plans says false and a coma

$schema['controllers']['vendor_plans'] = array(
    'permissions' => false,
);

return $schema;


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11110 posts

Posted 15 January 2019 - 06:26 PM #11

 

The original vendor_plans says false and a coma

$schema['controllers']['vendor_plans'] = array(
    'permissions' => false,
);

return $schema;

 

"vendor_plans" is not "vendor_tabs" so the two are separate.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 222 posts

Posted 15 January 2019 - 07:48 PM #12

"vendor_plans" is not "vendor_tabs" so the two are separate.

 

Thanks, the question was what does the "false" in the vendor_plans do different from "true" in the vendor_tabs' vendor_multivendor.post.php files



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11110 posts

Posted 15 January 2019 - 11:45 PM #13

Thanks, the question was what does the "false" in the vendor_plans do different from "true" in the vendor_tabs' vendor_multivendor.post.php files

 

Hmm, don't see that question.  The true/false grants/denies access access to the controller.  And in his second case, it grants/denies for a specific mode of the controller.

 

The comma is optional (for historic reasons) in PHP for the last element of an array().  I.e. it's ignored if it's the trailing delimiter in a declaration.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18650 posts

Posted 16 January 2019 - 06:21 AM #14

Thanks, the question was what does the "false" in the vendor_plans do different from "true" in the vendor_tabs' vendor_multivendor.post.php files

 

In your case vendor will have access to vendor_tabs, but vendor_plans will be forbidden


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 222 posts

Posted 16 January 2019 - 06:46 AM #15

In your case vendor will have access to vendor_tabs, but vendor_plans will be forbidden

 

I have checked again the behavior of both addons on the vendor's side. When Vendor Tabs is active there are no more vendor plans - all vendor admins have equal access to everything, like in the standard MV, but they still cannot create tabs. This option is available only to the site admin.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18650 posts

Posted 16 January 2019 - 02:07 PM #16

I have checked again the behavior of both addons on the vendor's side. When Vendor Tabs is active there are no more vendor plans - all vendor admins have equal access to everything, like in the standard MV, but they still cannot create tabs. This option is available only to the site admin.

 

Please make sure that this feature is not part of the Vendor tabs addon functionality 


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 222 posts

Posted 16 January 2019 - 06:18 PM #17

Please make sure that this feature is not part of the Vendor tabs addon functionality 

 

Vendor Plans has been designed only in August/September '18 for MV+ while Vendor Tabs is out there since January '18,

 

https://forum.cs-car...or-multivendor/



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18650 posts

Posted 17 January 2019 - 05:51 AM #18

Hm... Did you try to contact CS-Cart team with this issue?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 222 posts

Posted 17 January 2019 - 06:48 AM #19

Hm... Did you try to contact CS-Cart team with this issue?

 

This is not part of their work. Contacted instead the author of this script who is a regular CS-Cart user like us. Forget about it. The addon itself must have different functionality - tabs should be created either by admin for all vendors, or by the vendors depending on their needs. First option is preferable. So waiting for some developer to find this project interesting and offer an official addon on the CS-Cart marketplace.

 

https://forum.cs-car...or-multivendor/



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11110 posts

Posted 17 January 2019 - 06:14 PM #20

Vendor Plans has been designed only in August/September '18 for MV+ while Vendor Tabs is out there since January '18,

 

https://forum.cs-car...or-multivendor/

I think you are confusing the standard Vendor Plans addon with the new Vendor addon (not sure of the name) that adds additional functionality but comes with a hefty price tag.  Not familiar with any Vendor Tabs addon from cs-cart.  Must be from 3rd party.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.