Skip to content

Commit

Permalink
Merge pull request #21 from Adyen/feature/AD-333
Browse files Browse the repository at this point in the history
AD-333 Create CMS Components for Express Payment Methods Placeholder …
  • Loading branch information
pjaneta authored Oct 23, 2024
2 parents 95d1790 + bc8f888 commit 0bbc53b
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 20 deletions.
34 changes: 19 additions & 15 deletions projects/adyen-payments/import/adyen-payment-details.impex
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
$contentCatalog=electronics-spaContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]
$contentCatalog = electronics-spaContentCatalog
$contentCV = catalogVersion(CatalogVersion.catalog(Catalog.id[default = $contentCatalog]), CatalogVersion.version[default = Staged])[default = $contentCatalog:Staged]

INSERT_UPDATE ContentPage;$contentCV[unique=true];uid[unique=true];name;masterTemplate(uid,$contentCV);label;defaultPage[default='true'];approvalStatus(code)[default='approved'];homepage[default='false']
;;CheckoutAdyenPaymentDetails;Checkout Adyen Payment Details Page;MultiStepCheckoutSummaryPageTemplate;/checkout/adyen-payment-details
INSERT_UPDATE ContentPage; $contentCV[unique = true]; uid[unique = true] ; name ; masterTemplate(uid, $contentCV) ; label; defaultPage[default = 'true']; approvalStatus(code)[default = 'approved']; homepage[default = 'false']
; ; CheckoutAdyenPaymentDetails ; Checkout Adyen Payment Details Page ; MultiStepCheckoutSummaryPageTemplate ; /checkout/adyen-payment-details

INSERT_UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];name;cmsComponents(uid, $contentCV)
;;BodyContentSlot-CheckoutAdyenPaymentDetails;Checkout Payment Details Slot;CheckoutProgressComponent,CheckoutProgressMobileTopComponent,CheckoutAdyenPaymentDetailsComponent,CheckoutProgressMobileBottomComponent
;;SideContentSlot-CheckoutAdyenPaymentDetails;Order Summary Slot;CheckoutOrderSummaryComponent
INSERT_UPDATE ContentSlot; $contentCV[unique = true]; uid[unique = true] ; name ; cmsComponents(uid, $contentCV)
; ; BodyContentSlot-CheckoutAdyenPaymentDetails ; Checkout Payment Details Slot ; CheckoutProgressComponent,CheckoutProgressMobileTopComponent,CheckoutAdyenPaymentDetailsComponent,CheckoutProgressMobileBottomComponent
; ; SideContentSlot-CheckoutAdyenPaymentDetails ; Order Summary Slot ; CheckoutOrderSummaryComponent

INSERT_UPDATE ContentSlotForPage;$contentCV[unique=true];uid[unique=true];position[unique=true];page(uid,$contentCV)[unique=true];contentSlot(uid,$contentCV)[unique=true]
;;BodyContent-CheckoutAdyenPaymentDetails;BodyContent;CheckoutAdyenPaymentDetails;BodyContentSlot-CheckoutAdyenPaymentDetails
;;SideContent-CheckoutAdyenPaymentDetails;SideContent;CheckoutAdyenPaymentDetails;SideContentSlot-CheckoutAdyenPaymentDetails
INSERT_UPDATE ContentSlotForPage; $contentCV[unique = true]; uid[unique = true] ; position[unique = true]; page(uid, $contentCV)[unique = true]; contentSlot(uid, $contentCV)[unique = true]
; ; BodyContent-CheckoutAdyenPaymentDetails ; BodyContent ; CheckoutAdyenPaymentDetails ; BodyContentSlot-CheckoutAdyenPaymentDetails
; ; SideContent-CheckoutAdyenPaymentDetails ; SideContent ; CheckoutAdyenPaymentDetails ; SideContentSlot-CheckoutAdyenPaymentDetails

INSERT_UPDATE CMSFlexComponent;$contentCV[unique=true];uid[unique=true];name;flexType
;;CheckoutAdyenPaymentDetailsComponent;CheckoutAdyenPaymentDetailsComponent;CheckoutAdyenPaymentDetails
;;AdyenOrderPaymentStatusComponent;AdyenOrderPaymentStatusComponent;AdyenOrderPaymentStatusComponent
INSERT_UPDATE CMSFlexComponent; $contentCV[unique = true]; uid[unique = true] ; name ; flexType
; ; CheckoutAdyenPaymentDetailsComponent ; CheckoutAdyenPaymentDetailsComponent ; CheckoutAdyenPaymentDetails
; ; AdyenOrderPaymentStatusComponent ; AdyenOrderPaymentStatusComponent ; AdyenOrderPaymentStatusComponent
; ; AdyenSpaExpressCheckoutCartPageComponent ; AdyenSpaExpressCheckoutCartPageComponent ; AdyenSpaExpressCheckoutCartPageComponent
; ; AdyenSpaExpressCheckoutProductPageComponent ; AdyenSpaExpressCheckoutProductPageComponent ; AdyenSpaExpressCheckoutProductPageComponent

UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];cmsComponents(uid, $contentCV)
;;BodyContent-orderConfirmation;OrderConfirmationThankMessageComponent,AdyenOrderPaymentStatusComponent,OrderConfirmationShippingComponent,OrderConfirmationPickUpComponent,ExportOrderEntriesComponent,OrderConfirmationBillingComponent,OrderConfirmationTotalsComponent,OrderConfirmationContinueButtonComponent
UPDATE ContentSlot; $contentCV[unique = true]; uid[unique = true] ; cmsComponents(uid, $contentCV)
; ; BodyContent-orderConfirmation ; OrderConfirmationThankMessageComponent,AdyenOrderPaymentStatusComponent,OrderConfirmationShippingComponent,OrderConfirmationPickUpComponent,ExportOrderEntriesComponent,OrderConfirmationBillingComponent,OrderConfirmationTotalsComponent,OrderConfirmationContinueButtonComponent
; ; CenterRightContentSlot-cartPage ; CartTotalsComponent,CartApplyCouponComponent,CartQuickOrderFormComponent,CartProceedToCheckoutComponent,AdyenSpaExpressCheckoutCartPageComponent
; ; ProductSummarySlot ; ProductImagesComponent,ProductIntroComponent,QualtricsEmbeddedFeedbackComponent,ProductSummaryComponent,VariantSelector,AddToCart,AdyenSpaExpressCheckoutProductPageComponent,ConfigureProductComponent,AddToWishListComponent,StockNotificationComponent
8 changes: 7 additions & 1 deletion projects/adyen-payments/src/lib/adyen-payments.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import {I18nConfig, provideConfig, provideDefaultConfig} from '@spartacus/core';
import {adyenCheckoutTranslationChunksConfig, adyenCheckoutTranslations} from "./assets/translations/translations";
import {AdyenOrderConnector} from "./core/connectors/adyen-order-connector.service";
import {OccAdyenOrderAdapter} from "./core/occ/adapters/occ-adyen-order.adapter";
import {
ExpressCheckoutProductModule
} from "./product/components/express-checkout-product/express-checkout-product.module";
import {ExpressCheckoutCartModule} from "./cart/components/express-checkout-cart/express-checkout-cart.module";



Expand All @@ -27,7 +31,9 @@ import {OccAdyenOrderAdapter} from "./core/occ/adapters/occ-adyen-order.adapter"
CheckoutAdyenPaymentMethodModule,
CheckoutAdyenEventModule,
CheckoutAdyenRootModule,
AdyenRedirectModule
AdyenRedirectModule,
ExpressCheckoutProductModule,
ExpressCheckoutCartModule
],
providers: [CheckoutAdyenConfigurationService,
AdyenOrderService,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>express-checkout-cart works!</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "bootstrap/scss/bootstrap";

:host {
@include media-breakpoint-down(md) {
order: 6
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ExpressCheckoutCartComponent } from './express-checkout-cart.component';

describe('ExpressCheckoutCartComponent', () => {
let component: ExpressCheckoutCartComponent;
let fixture: ComponentFixture<ExpressCheckoutCartComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ExpressCheckoutCartComponent]
})
.compileComponents();

fixture = TestBed.createComponent(ExpressCheckoutCartComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'cx-express-checkout-cart',
templateUrl: './express-checkout-cart.component.html',
styleUrl: './express-checkout-cart.component.scss'
})
export class ExpressCheckoutCartComponent {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {ConfigModule} from '@spartacus/core';
import {ExpressCheckoutCartComponent} from "./express-checkout-cart.component";


@NgModule({
imports: [
CommonModule,
ConfigModule.withConfig({
cmsComponents: {
AdyenSpaExpressCheckoutCartPageComponent: {
component: ExpressCheckoutCartComponent
}
}
})
],
declarations: [ExpressCheckoutCartComponent],
exports: [ExpressCheckoutCartComponent]
})
export class ExpressCheckoutCartModule {
}
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
@import '@adyen/adyen-web/dist/adyen.css';

.adyen-checkout__dropin .adyen-checkout__applepay__button {
-webkit-appearance: -apple-pay-button;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>express-checkout-product works!</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ExpressCheckoutProductComponent } from './express-checkout-product.component';

describe('ExpressCheckoutProductComponent', () => {
let component: ExpressCheckoutProductComponent;
let fixture: ComponentFixture<ExpressCheckoutProductComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ExpressCheckoutProductComponent]
})
.compileComponents();

fixture = TestBed.createComponent(ExpressCheckoutProductComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'cx-express-checkout-product',
templateUrl: './express-checkout-product.component.html',
styleUrl: './express-checkout-product.component.css'
})
export class ExpressCheckoutProductComponent {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {ConfigModule} from '@spartacus/core';
import {ExpressCheckoutProductComponent} from "./express-checkout-product.component";


@NgModule({
imports: [
CommonModule,
ConfigModule.withConfig({
cmsComponents: {
AdyenSpaExpressCheckoutProductPageComponent: {
component: ExpressCheckoutProductComponent
}
}
})
],
declarations: [ExpressCheckoutProductComponent],
exports: [ExpressCheckoutProductComponent]
})
export class ExpressCheckoutProductModule {
}

0 comments on commit 0bbc53b

Please sign in to comment.