What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Display customer list
Hi Team,
I have added a GUI module in merchant portal, and want to display customer list for the same . I am using Customer Facade for the same, but unable to get the customer list . Is there anything else that needs to be done ?
Comments
-
I'm not sure if this is your case but you need to expand the permissions to be able to access other objects from the Merchant Portal
0 -
you can check here
vendor/spryker/acl-merchant-portal/src/Spryker/Zed/AclMerchantPortal/Business/Expander/AclEntity/AclEntityMetadataConfigExpander.php
0 -
I have created a dataprovider using customerQuery and customerCollection , but the collection is returning empty sets
0 -
This is the repository code
$customerQuery = $this->buildCustomerTableBaseQuery(
$customerTableCriteriaTransfer
);
//print_r($productOfferQuery);
$propelPager = $customerQuery->paginate(
$customerTableCriteriaTransfer->requirePage()->getPage(),
$customerTableCriteriaTransfer->requirePageSize()->getPageSize(),
);
However
$propelPager->getResults()->getData()
return empty0 -
protected function buildCustomerTableBaseQuery(
CustomerTableCriteriaTransfer $customerTableCriteriaTransfer
): SpyCustomerQuery {
$customerQuery = $this->getFactory()->getCustomerPropelQuery();
$customerQuery
->addAsColumn(CustomerTransfer::CUSTOMER_REFERENCE, SpyCustomerTableMap::COL_CUSTOMER_REFERENCE)
->addAsColumn(CustomerTransfer::FIRST_NAME , SpyCustomerTableMap::COL_FIRST_NAME)
->addAsColumn(CustomerTransfer::LAST_NAME , SpyCustomerTableMap::COL_LAST_NAME)
->addAsColumn(CustomerTransfer::EMAIL , SpyCustomerTableMap::COL_EMAIL)
->select([
customerTransfer::CUSTOMER_REFERENCE,
CustomerTransfer::FIRST_NAME,
CustomerTransfer::LAST_NAME,
CustomerTransfer::EMAIL
]);
return $customerQuery;
}0 -
Anything we can get on this issue ?
0 -
your code looks ok, so it's probably what I referenced in my previous message, when you don't have the ACL permissions configured for an object in the merchant portal, the query will just return an empty result, as a test you can just include the customer object to the file in the vendor folder, something like this
$aclEntityMetadataCollectionTransfer->addAclEntityMetadata( 'Orm\Zed\Customer\Persistence\SpyCustomer', (new AclEntityMetadataTransfer()) ->setEntityName('Orm\Zed\Customer\Persistence\SpyCustomer') ->setDefaultGlobalOperationMask( AclEntityConstants::OPERATION_MASK_READ, ), );
0 -
Thanks Mate. It worked . Also needed to add Customer in Allow list in expandAclEntityMetadataConfigWithAllowList method
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random