Can super admin hide some categories for vendors

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Can super admin hide some categories for vendors

Post by ahmed31916 » 02 Jun 2022, 13:05

Hello,

Can I hide some categories and show others from the merchant admin interface?

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: Can super admin hide some categories for vendors

Post by aimeos » 03 Jun 2022, 18:47

In the admin backend only if you customize the code. If you write your own code, you have full control over the displayed categories.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Re: Can super admin hide some categories for vendors

Post by ahmed31916 » 04 Jun 2022, 12:31

May I will need to add new column in catalog table to hide or show cat, right?

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: Can super admin hide some categories for vendors

Post by aimeos » 06 Jun 2022, 06:39

You can use the catalog.status property (mshop_catalog.status column) and it's values to hide categories.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Re: Can super admin hide some categories for vendors

Post by ahmed31916 » 08 Jun 2022, 03:32

How to filter by catalog status (after get children)?

Code: Select all

\Aimeos\MShop::create( $context, 'catalog' )->getTree()->getChildren()

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: Can super admin hide some categories for vendors

Post by aimeos » 10 Jun 2022, 07:01

Code: Select all

\Aimeos\MShop::create( $context, 'catalog' )
	->getTree()
	->getChildren()
	->filter( function( $item ) {
		return $item->getStatus() > 0;
	} );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply