How to access the data for Custom created table in merchant portal gui module.
I have created a custom database table in TestArticle Module → PyzTestArticle now i want to fetch data for that table in Merchant portal Gui module i have setup all the things using facade dependency but always i get 0 data row from that table not able to acess the data for that table .
what ACL entity or ACL metrchant portal configuration i have to do for using that.
Answers
-
We have a dedicated course to the Merchant portal:
The backend part is the same as for any backoffice module. You need to have a controller to provide the data to the view.
The course goes step by step on the frontend part but also shows you how to create a new module, customer´s orders, and show that data in an angular table
0 -
Thanks for replying , i am facing issue while creting a new component in existing module name SalesMerchantPortalGui want to create a new component so what process i have to follow for that i have extended entry.ts and created mp.public-api . The content of entry.ts us import { registerNgModule } from '@mp/zed-ui';
import { ComponentsModule } from './app/components.module';
registerNgModule(ComponentsModule);and mp.public-api is
export * from './app/test-article-table/test-article-table.module';export * from './app/components.module';and This is my component.module.ts : -
import { NgModule } from '@angular/core';import { WebComponentsModule } from '@spryker/web-components';import { ButtonAjaxComponent, ButtonAjaxModule } from '@spryker/button';import { ChipsComponent, ChipsModule } from '@spryker/chips';import { CardModule, CardComponent } from '@spryker/card';import { TabsModule, TabsComponent, TabComponent } from '@spryker/tabs';
import { TestArticleTableComponent } from './test-article-table/test-article-table.component'; import { TestArtileTableModule } from './test-article-table/test-article-table.module'; import { ComponentsModule as CoreComponentsModule } from '@mp/sales-merchant-portal-gui';
@NgModule({ imports: [ CoreComponentsModule, WebComponentsModule.withComponents([ TestArticleTableComponent ]), ButtonAjaxModule, ChipsModule, CardModule, TabsModule, TestArtileTableModule ],})export class ComponentsModule {}i created one component also render this in view but the component is not apearing in my view when i load on browser only conponent tag is there not the conent inside that coponent , what procedure i have to follow if want to create new component in existing module.
0 -
it's pretty hard to see if there is any issue in the code. In the course, we do exactly what you're trying to accomplish. Follow that example where we create the component and render it:
0 -
@hCan we've example code for this course, it is hard to follow along with course, so it is fine if we've that example module
0 -
I'll be adding the commits to every lesson.
In the meantime, you can access the source code at:
1 -
@Hidran Arias , Thanks will look into this.
0 -
@Hidran Arias , I've copy customer module in my project but when I run
npm run mp:build:watch
I am getting below error, I've copy as it is to test in local and have not change anything in module.
globalThis.GLOBAL_NX_VERSION ?= GLOBAL_NX_VERSION;
^SyntaxError: Unexpected token '='
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:470 -
Please, try copying again the module. I just pushed the latest modifications . I tried it locally and it works.
https://github.com/spryker-academy/marketplace-b2c-course/tree/main/src/Pyz/Zed/CustomerMerchantPortalGuiCopy also the DTO
https://github.com/spryker-academy/marketplace-b2c-course/tree/main/src/Pyz/Shared/CustomerMerchantPortalGui
Run docker/sdk console router:cache:warm-up:merchant-portal. so the link is available.
Enable the module by going to the backoffice as admin and adding the bundle customer/merchant-portal-gui to the Merchant role (harald) and * for controller and actions0
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