Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

List vendor products from another vendor account

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 09-10-2018, 06:19 AM
 
amarquis amarquis is offline
 

Advanced Member
  
Join Date: Apr 2018
Posts: 70
 

Default List vendor products from another vendor account

I am on Multivendor 5.3.5.5

If I do the following, in the admin area:

PHP Code:
$products = \XLite\Core\Database::getRepo('XLite\Model\Product')->findAll(); 

when logged in with an Administrator account, all products are listed.

If I do the same, logged in with a vendor account, only the current vendor products are listed.

How would I go about listing ALL products from a vendor account, including other vendors' products?
__________________
5.3.5.8
Reply With Quote
  #2  
Old 09-10-2018, 06:49 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: List vendor products from another vendor account

Why would you want to do this? It completely defeats the purpose of multivendor
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 09-10-2018, 10:36 PM
 
amarquis amarquis is offline
 

Advanced Member
  
Join Date: Apr 2018
Posts: 70
 

Default Re: List vendor products from another vendor account

I am not asking whether you like the idea or not. This is my use case. I need a view, somewhere in the admin area, where a specific vendor role, can list (display) products from other vendors. Full stop. Can it be done? And if yes, how?
__________________
5.3.5.8
Reply With Quote
  #4  
Old 09-11-2018, 05:03 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: List vendor products from another vendor account

Sure it can be done. Look in the vendor module and override where it restricts the return of search results.
It could be in the model it could be in the conditions send by the view you are looking at.
This is not a simple "go here and change this" answer
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 09-11-2018, 05:27 AM
 
amarquis amarquis is offline
 

Advanced Member
  
Join Date: Apr 2018
Posts: 70
 

Default Re: List vendor products from another vendor account

As I am using QueryBuilder to retrieve the products, the simple "go here and change this" answer in my case was to decorate \XLite\Model\Repo\Product and set $enableVendorCondition to FALSE.
__________________
5.3.5.8
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:58 AM.

   

 
X-Cart forums © 2001-2020