-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #460 from Adyen/feature/AD-319
AD-319 Create CMS Components for Express Payment Methods Placeholder …
- Loading branch information
Showing
6 changed files
with
84 additions
and
7 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
.../web/src/com/adyen/v6/controllers/cms/AdyenAccCartExpressCheckoutComponentController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.adyen.v6.controllers.cms; | ||
|
||
import com.adyen.v6.model.contents.components.AdyenAccExpressCheckoutCartPageComponentModel; | ||
import de.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.Model; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
@Controller(AdyenAccExpressCheckoutCartPageComponentModel._TYPECODE + "Controller") | ||
@RequestMapping(value = "/view/" + AdyenAccExpressCheckoutCartPageComponentModel._TYPECODE + "Controller") | ||
public class AdyenAccCartExpressCheckoutComponentController extends AbstractCMSAddOnComponentController<AdyenAccExpressCheckoutCartPageComponentModel> { | ||
|
||
@Override | ||
protected void fillModel(final HttpServletRequest request, final Model model, final AdyenAccExpressCheckoutCartPageComponentModel component) { | ||
model.addAttribute("test", "testValue"); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...b/src/com/adyen/v6/controllers/cms/AdyenAccProductExpressCheckoutComponentController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.adyen.v6.controllers.cms; | ||
|
||
import com.adyen.v6.model.contents.components.AdyenAccExpressCheckoutProductPageComponentModel; | ||
import de.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.Model; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
@Controller(AdyenAccExpressCheckoutProductPageComponentModel._TYPECODE + "Controller") | ||
@RequestMapping(value = "/view/" + AdyenAccExpressCheckoutProductPageComponentModel._TYPECODE + "Controller") | ||
public class AdyenAccProductExpressCheckoutComponentController extends AbstractCMSAddOnComponentController<AdyenAccExpressCheckoutProductPageComponentModel> { | ||
|
||
@Override | ||
protected void fillModel(final HttpServletRequest request, final Model model, final AdyenAccExpressCheckoutProductPageComponentModel component) { | ||
model.addAttribute("test", "testValue"); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...don/web/webroot/WEB-INF/views/responsive/cms/adyenaccexpresscheckoutcartpagecomponent.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<%@ page trimDirectiveWhitespaces="true" %> | ||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
|
||
<div class="row"> | ||
<div class="col-sm-8 col-md-6 pull-right"> | ||
Cart Page Express Checkout component | ||
<br> | ||
${test} | ||
</div> | ||
</div> |
8 changes: 8 additions & 0 deletions
8
.../web/webroot/WEB-INF/views/responsive/cms/adyenaccexpresscheckoutproductpagecomponent.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<%@ page trimDirectiveWhitespaces="true" %> | ||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
|
||
<div> | ||
Product Page Express Checkout component | ||
<br> | ||
${test} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 20 additions & 7 deletions
27
adyenv6b2ccheckoutaddon/resources/impex/projectdata-cms-config.impex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
$contentCatalog=electronicsContentCatalog | ||
$contentCVS=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged] | ||
$contentCVO=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Online])[default=$contentCatalog:Online] | ||
$contentCatalog = electronicsContentCatalog | ||
$contentCVS = catalogVersion(CatalogVersion.catalog(Catalog.id[default = $contentCatalog]), CatalogVersion.version[default = Staged])[default = $contentCatalog:Staged] | ||
$contentCVO = catalogVersion(CatalogVersion.catalog(Catalog.id[default = $contentCatalog]), CatalogVersion.version[default = Online])[default = $contentCatalog:Online] | ||
|
||
INSERT_UPDATE JspIncludeComponent;uid[unique=true];page;$contentCVS[unique=true] | ||
;CartComponent;/WEB-INF/views/responsive/pages/cart/cartDisplay.jsp | ||
INSERT_UPDATE JspIncludeComponent; uid[unique = true]; page; $contentCVS[unique = true] | ||
; CartComponent ; /WEB-INF/views/responsive/pages/cart/cartDisplay.jsp | ||
|
||
|
||
INSERT_UPDATE JspIncludeComponent;uid[unique=true];page;$contentCVO[unique=true] | ||
;CartComponent;/WEB-INF/views/responsive/pages/cart/cartDisplay.jsp | ||
INSERT_UPDATE JspIncludeComponent; uid[unique = true]; page; $contentCVO[unique = true] | ||
; CartComponent ; /WEB-INF/views/responsive/pages/cart/cartDisplay.jsp | ||
|
||
INSERT_UPDATE ContentSlot; $contentCVS[unique = true]; uid[unique = true]; cmsComponents(&componentRef)[mode = merge] | ||
; ; AddToCartSlot ; AccAdyenProductExpressCheckout | ||
|
||
INSERT_UPDATE AdyenAccExpressCheckoutProductPageComponent; $contentCVS[unique = true]; uid[unique = true] ; name ; &componentRef | ||
; ; AccAdyenProductExpressCheckout ; Adyen Accelerator Product Page Express Checkout ; AccAdyenProductExpressCheckout | ||
|
||
INSERT_UPDATE ContentSlot; $contentCVS[unique = true]; uid[unique = true] ; cmsComponents($contentCVS, uid) | ||
; ; TopContent-cartPage ; AccAdyenCartExpressCheckout,CartComponent | ||
; ; BottomContentSlot-cartPage ; CheckoutComponent,AccAdyenCartExpressCheckout,CartSuggestions | ||
|
||
INSERT_UPDATE AdyenAccExpressCheckoutCartPageComponent; $contentCVS[unique = true]; uid[unique = true] ; name ; &componentRef | ||
; ; AccAdyenCartExpressCheckout ; Adyen Accelerator Cart Page Express Checkout ; AccAdyenCartExpressCheckout |