[old] Installation
Custom Tax Logic
The Progressive Leasing cartridge may need to make tax adjustments to finalized orders. Any tax service integrations need to be below progressiveleasing_sg_changes in cartridge precedence. Please ensure progressiveleasing_sg_changes (optional) is inserted to the left of any tax integrations in the cartridge path. This cartridge contains all custom code changes needed and can be used to setup PGL quickly.
Step 1: Add Cartridges to Demandware Admin
The progressive Leasing LINK integration uses the following cartridges: int_progressiveleasing, int_progressiveleasing_sfra, int_progressiveleasing_sg, progressiveleasing_sfra_changes and progressiveleasing_sg_changes.
- Navigate to "Administration ā Sites ā Manage Sites ā <Merchant Site> ā Settings"
- Add the cartridge names to Cartridges path as shown in screenshot below:
The site effect path should be āprogressiveleasing_sg_changes:int_progressiveleasing_sg:app_storefront_controllers:app_storefront_core:int_progressiveleasingā.
āprogressiveleasing_sg_changesā is optional and contains all custom code changes. It can be used for quick setup.

Step 2: Import Progressive Leasing Metadata
Replace Library ID's
Make sure to replace library IDās under libraries folder āRefArchSharedLibraryā and āSiteGenesisSharedLibraryā and in library.xml file with the correct IDās. Make sure to rename the folders inside āsitesā directory with the correct site ID. Make sure to replace āRefArchā and āSiteGenesisā in access-roles.xml with correct site ID.
- Copy the metadata.zip file from Progressive Leasing cartridgeās Metadata folder to a temporary file location.
- Unzip the file.
- In metadata/sites/SiteGenesis, change the names of the folders āSiteGenesisā and āRefArchā to the site ID for which Progressive Leasing is being installed.
- In metadata/libraries , change the names of the folders āRefArchSharedLibraryā and āSiteGenesisSharedLibraryā to the correct library ID.
- In metadata/access-roles.xml, replace āRefArchā and āSiteGenesisā with correct site ID.
- Use a zip utility to compress the modified folder.
- Navigate to Site Development Ć Site Import & Export
- Select metadata.zip file and click on āImportā and complete the import process through the interface.
- The Content Asset, Payment Method, Services, Site Preferences, System Objectās attributes will be imported
- The details on services are described in section 3.3.
- The details on Progressive Leasing Custom Preferences are described in section 5.2.1. For further details on system objects see section 5.2.2 and 5.2.3.
Step 3: Add Progressive Hooks
Add Progressive Leasing Head
Modify htmlhead_UI.isml template to include progressiveleasinghead.isml:
<iscontentāÆtype="text/html"āÆcharset="UTF-8"āÆcompact="true"/>āÆāÆ
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆheaderāÆ</iscomment>āÆāÆ
<isincludeāÆtemplate="includes/progressiveleasinghead"/>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆheaderāÆ</iscomment>
The template can be located at following path:
āprogressiveleasing_sg_changes /cartridge/templates/default/components/header/htmlhead_UI.ismlā
Add Progressive Leasing Footer
Modify footer_UI.isml template to include progressiveleasingfooter.isml:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆfooterāÆ</iscomment>āÆāÆ
<isincludeāÆtemplate="includes/progressiveleasingfooter"/>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆfooterāÆ</iscomment>
The template may be located at the following path:
āprogressiveleasing_sg_changes /cartridge/templates/default/components/footer/footer_UI.ismlā
Add Product Tile Messaging
To display leasable product messaging on the product tile include following module in producttitle.isml:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆproductāÆtileāÆmessagingāÆ</iscomment>
<isincludeāÆtemplate="util/plmodules.isml"āÆ/>
<isprogressivetilemessagingāÆproduct="${Product}"āÆ/>
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆproductāÆtileāÆmessagingāÆ</iscomment>
This template may be located at following path;
āprogressiveleasing_sg_changes /cartridge/templates/default/product/producttile.ismlā
Add Product Details Messaging
To display leasable product messaging alongside product price on product details page, include following module in productcontent.isml:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆpdpāÆmessagingāÆ</iscomment>
<isincludeāÆtemplate="util/plmodules.isml"āÆ/>
<isprogressivepdpmessagingāÆproduct="${pdict.Product}"āÆ/>
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆpdpāÆmessagingāÆ</iscomment>
The template may be located at following path;
āprogressiveleasing_sg_changes /cartridge/templates/default/product/productcontent.ismlā
Add Cart Messaging
To display messaging on cart page, include following template in cart.isml.
<iscomment>CustomāÆStart:āÆPGLāÆErrorāÆMessaging</iscomment>āÆāÆ
āÆāÆāÆāÆ<div>āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ<isifāÆcondition="${!empty(pdict.pglErrorMsg)}"āÆ>āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆ<h3āÆclass="error-form">${pdict.pglErrorMsg}</h3>āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ</isif>āÆāÆ
āÆāÆāÆāÆ</div>āÆāÆ
āÆāÆāÆāÆ<iscomment>CustomāÆEnd:āÆPGLāÆErrorāÆMessaging</iscomment>
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆcartāÆmessagingāÆ</iscomment>
<isincludeāÆtemplate="components/progressiveleasing/cartmessaging"/>
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆcartāÆmessagingāÆ</iscomment>
The template may be located at following path:
āprogressiveleasing_sg_changes /cartridge/templates/default/checkout/cart/cart.ismlā
Add Progressive Leasing Payment Method
In order to provide the progressive leasing payment method in the checkout billing page, include progressiveleasing.isml in paymentmethods.isml template:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆ</iscomment>
<isincludeāÆtemplate="checkout/billing/progressiveleasing"āÆ/>
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆ</iscomment>
This template can be located at following path:
āprogressiveleasing_sg_changes /cartridge/templates/default/checkout/billing/paymentmethods.ismlā
Add Progressive Leasing Cart Validator
For validating leasable and non-leasable products, ProgressiveLeasingValidator should be included in the Cart.js controller. Following custom code should be added:
i) Import ProgressiveLeasingValidator script at the top of the controller
//CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆāÆ
varāÆProgressiveLeasingValidatorāÆ=āÆrequire('*/cartridge/scripts/validator/ProgressiveLeasingValidator');āÆāÆ
//CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasing
ii) Add the following code in the 'show': function:
//āÆCustomāÆStart:āÆPGLāÆerrorāÆmessageāÆāÆ
varāÆreqParamāÆ=āÆrequest.httpParameterMap;āÆāÆ
varāÆpglErrorMsgāÆ=āÆ!empty(reqParam.get('pglErrorMsg'))āÆ?āÆreqParam.get('pglErrorMsg').valueāÆ:āÆ'';āÆāÆ
//āÆCustomāÆEnd:āÆPGLāÆerrorāÆmessage
cartForm.get('shipments').invalidate();
app.getView('Cart',āÆ{āÆāÆ
āÆāÆāÆāÆcart:āÆapp.getModel('Cart').get(),āÆāÆ
āÆāÆāÆāÆRegistrationStatus:āÆfalse,āÆāÆ
āÆāÆāÆāÆpglErrorMsg:āÆpglErrorMsgāÆāÆ
}).render('checkout/cart/cart');
iii) Add the following code in the 'checkoutCart': function, before validationResult = cart.validateForCheckout();
//CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆvalidatorāÆāÆ
if(!ProgressiveLeasingValidator.validateCart())āÆ{āÆāÆ
āÆāÆāÆāÆresponse.redirect(URLUtils.https('Cart-Show'));āÆāÆ
āÆāÆāÆāÆsession.privacy.showProgressivingLeasingMessageāÆ=āÆtrue;āÆāÆ
āÆāÆāÆāÆreturnāÆnull;āÆāÆ
āÆ}āÆāÆ
//CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆvalidator
The Cart controller may be located at the following path:
āprogressiveleasing_sg_changes /cartridge/controllers/Cart.jsā
Add Progressive Leasing Order Confirmation Service Call
To confirm order on PGL side a service call is needed when order is confirmed on SFCC storefront in COPlaceOrder.js controller. Following custom code should be added:
i) Import PGL scripts at the top of the controller
CustomāÆStart:āÆPGLāÆScriptāÆModulesāÆāÆ
varāÆplConstantsāÆ=āÆrequire('*/cartridge/scripts/util/progressiveleasingConstants');āÆāÆ
varāÆplHelpersāÆ=āÆrequire('*/cartridge/scripts/helper/progressiveLeasingHelper');āÆāÆ
varāÆplServiceāÆ=āÆrequire('*/cartridge/scripts/service/progressiveLeasingService');
//CustomāÆEnd:āÆPGLāÆScriptāÆModules
ii) Add the following code in the 'start' function on line 185-189;
//āÆCustomāÆStart:āÆPGLāÆorderāÆconfirmationāÆserviceāÆcallāÆāÆ
ifāÆ(plConstants.PL_ENABLEDāÆ&&āÆ!orderPlacementStatus.errorāÆ&&āÆplHelpers.isPaymentPGL(order))āÆ{āÆāÆ
āÆāÆāÆāÆplService.confirmOrder(order.custom.pglLeaseID);āÆāÆ
}āÆāÆ
//āÆCustomāÆStart:āÆPGLāÆorderāÆconfirmationāÆserviceāÆcall
The COPlaceOrder may be located at āprogressiveleasing_sg_changes /cartridge/controllers/ COPlaceOrder.jsā
Add Order Details Messaging
In order to display progressive leasing id on the order detail/confirmation page, include following module in orderdetails.isml (the module should be included inside the payment-type section):
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆorderāÆmessagingāÆ</iscomment>
<isprogressiveordermessagingāÆpaymentInstr=${paymentInstr}āÆ/>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆorderāÆmessagingāÆ</iscomment>
This template can be located at following path:
āprogressiveleasing_sg_changes /cartridge/templates/default/components/order/orderdetails.ismlā
Add Support for Progressive Leasing Orders
In order to handle PGL order, include the following code in calculate.js file.
Require PGL scripts,
varāÆProgressiveLeasingāÆ=āÆrequire('*/cartridge/scripts/service/progressiveLeasingService');
varāÆPLConstantsāÆ=āÆrequire('*/cartridge/scripts/util/progressiveleasingConstants');
Create a function removeTax(basket) like,
//āÆOnlyāÆremoveāÆtaxesāÆif:āÆāÆ
//āÆāÆ-āÆIt'sāÆaāÆPGLāÆtransactionāÆāÆ
//āÆāÆ-āÆTheāÆbillingāÆstepāÆhasāÆbeenāÆcompletedāÆāÆ
functionāÆremoveTax(basket)āÆ{āÆ//āÆeslint-disable-lineāÆāÆ
āÆāÆāÆāÆifāÆ(!empty(basket))āÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆvarāÆshipmentsāÆ=āÆbasket.getShipments().iterator();āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆwhileāÆ(shipments.hasNext())āÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆvarāÆshipmentāÆ=āÆshipments.next();āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆTransaction.wrap(functionāÆ()āÆ{āÆ//āÆeslint-disable-lineāÆno-loop-funcāÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆvarāÆlineItemIterāÆ=āÆshipment.getAllLineItems().iterator();āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆwhileāÆ(lineItemIter.hasNext())āÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆvarāÆlineItemāÆ=āÆlineItemIter.next();āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆvarāÆtaxBasisāÆ=āÆnewāÆdw.value.Money(0.00,āÆ'USD');āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆlineItem.updateTax(0.0,āÆtaxBasis);āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆ}āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆbasket.updateTotals();āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆ});āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ}āÆāÆ
āÆāÆāÆāÆ}āÆāÆ
}
Create a function "prepareShippingMethod(basket)" like,
/**āÆ
āÆ*āÆPrepareāÆShippingāÆmethodāÆ
āÆ*āÆ
āÆ*āÆ@paramāÆ{Object}āÆbasketāÆ-āÆTheāÆbasketāÆcontainingāÆtheāÆelementsāÆtoāÆbeāÆcomputedāÆ
āÆ*/āÆāÆ
functionāÆprepareShippingMethod(basket)āÆ{āÆāÆ
āÆāÆāÆāÆifāÆ(!empty(basket))āÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆvarāÆshipmentāÆ=āÆbasket.getDefaultShipment();āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆvarāÆshippingMethodāÆ=āÆshipment.getShippingMethod();āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆifāÆ(empty(shippingMethod))āÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆTransaction.wrap(functionāÆ()āÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆvarāÆdefaultShippingMethodāÆ=āÆShippingMgr.getDefaultShippingMethod();
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆshipment.setShippingMethod(defaultShippingMethod);āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆ});āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ}āÆāÆ
āÆāÆāÆāÆ}āÆāÆ
}
Include custom logic in "calculate" function on starting lines,
varāÆisPGLPaymentāÆ=āÆfalse;āÆāÆ
varāÆpaymentInstrumentIterāÆ=āÆbasket.getPaymentInstruments().iterator();āÆāÆ
whileāÆ(paymentInstrumentIter.hasNext())āÆ{āÆāÆ
āÆāÆāÆāÆvarāÆpaymentInstrumentāÆ=āÆpaymentInstrumentIter.next();āÆāÆ
āÆāÆāÆāÆifāÆ(paymentInstrument.paymentMethodāÆ===āÆProgressiveLeasing.METHOD_PROGRESSIVE_LEASING)āÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆisPGLPaymentāÆ=āÆtrue;āÆāÆ
āÆāÆāÆāÆ}āÆāÆ
}āÆāÆ
prepareShippingMethod(basket);
Replace tax removing logic in "calculate" function where calculateTax(basket) is invoked,
//āÆCustomāÆStart:āÆPGLāÆconditionāÆtoāÆremoveāÆtaxāÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆifāÆ(PLConstants.PL_ENABLEDāÆ&&āÆPLConstants.PL_EXCLUDETAXāÆ&&āÆisPGLPaymentāÆ&&āÆsession.forms.billing.fulfilled.value)āÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆremoveTax(basket);āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ}āÆelseāÆ{āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆcalculateTax(basket);āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ}āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ//āÆCustomāÆEnd
Make sure the hook "dw.ocapi.shop.basket.calculate" is pointing to the appropriate calculate.js script
This script can be located at following path:
āprogressiveleasing_sg_changes /cartridge/scripts/cart/calculate.jsā
Add Frontend Scripts
A template providing the Progressive Leasing CSS and JavaScript should be included in scripts.isml:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆ</iscomment>āÆāÆ
<isincludeāÆtemplate="include/progressiveLeasingIncludes"āÆ/>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆ</iscomment>
A template providing the Progressive Leasing CSS and JavaScript should be included in homePage.isml:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆ</iscomment>āÆāÆ
<isincludeāÆtemplate="include/progressiveLeasingIncludes"āÆ/>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆ</iscomment>
A template providing the Progressive Leasing CSS and JavaScript should be included in searchResultsNoDecorator.isml:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆ</iscomment>āÆāÆ
<isincludeāÆtemplate="include/progressiveLeasingIncludes"āÆ/>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆ</iscomment>
Add Product Tile Messaging
To display leasable product messaging on the product tile include following template in productTitleFooter.isml:
<iscomment>āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆThisāÆtemplateāÆisāÆoverriddenāÆtoāÆincludeāÆProgressiveāÆLeasingāÆāÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆTileāÆMessagingāÆTemplate.āÆInāÆactualāÆintegrationāÆsimplyāÆincludeāÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆthisāÆtemplateāÆtoāÆdesiredāÆlocation.āÆāÆ
āÆāÆāÆāÆ</iscomment>āÆāÆ
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆtileāÆmessagingāÆ</iscomment>
<isincludeāÆtemplate="components/progressiveleasing/tileMessaging"āÆ/>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆtileāÆmessagingāÆ</iscomment>
See default overridden templates in the cartridge for reference:
ā/progressiveleasing_sfra_changes /cartridge/templates/default/product/ productTileFooter.isml
Add Product Details Messaging
To display leasable product messaging alongside product price on product details page, include following template in productDetails.isml:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆjsāÆandāÆcssāÆ</iscomment>āÆāÆ
<isincludeāÆtemplate="include/progressiveLeasingIncludes"āÆ/>āÆāÆ
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆjsāÆandāÆcssāÆ</iscomment>
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆpdpāÆmessagingāÆ</iscomment>āÆāÆ
<isincludeāÆtemplate="components/progressiveleasing/pdpMessaging"/>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆpdpāÆmessagingāÆ</iscomment>
See default overridden templates in the cartridge for reference:
ā/progressiveleasing_sfra_changes /cartridge/templates/default/product/ productDetails.ismlā
Add Cart Messaging
To display messaging on cart page, include following template in cart.isml:
<iscomment>CustomāÆStart:āÆPGLāÆErrorāÆMessaging</iscomment>āÆāÆ
<divāÆclass="container">āÆāÆ
āÆāÆāÆāÆ<divāÆclass="row">āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ<divāÆclass="col-12āÆtext-center">āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆ<isifāÆcondition="${!empty(pdict.pglErrorMsg)}"āÆ>āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆ<h3āÆclass="text-danger">${pdict.pglErrorMsg}</h3>āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆāÆ</isif>āÆāÆ
āÆāÆāÆāÆāÆāÆāÆāÆ</div>āÆāÆ
āÆāÆāÆāÆ</div>āÆāÆ
</div>āÆāÆ
<iscomment>CustomāÆEnd:āÆPGLāÆErrorāÆMessaging</iscomment>
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆcartāÆmessagingāÆ</iscomment>āÆ
<divāÆclass="col-sm-7āÆcol-md-8">āÆāÆ
āÆāÆāÆāÆ<isincludeāÆtemplate="components/progressiveleasing/cartMessaging"āÆ/>āÆāÆ
</div>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆcartāÆmessagingāÆ</iscomment>
See default overridden templates in the cartridge for reference:
ā/progressiveleasing_sfra_changes /cartridge/templates/default/cart/ cart.ismlā
Step 4: Add Progressive Leasing Payment Method
In order to provide the progressive leasing payment method in the checkout billing page, include the custom templates in paymentOptionsTab.isml and paymentOptionsContent.isml template:
1) Include following template along with condition in paymentOptionsTab.isml template
<iscomment>āÆāÆ
āÆāÆāÆāÆThisāÆtemplateāÆisāÆoverriddenāÆtoāÆincludeāÆProgressiveāÆLeasingāÆāÆāÆ
āÆāÆāÆāÆPaymentāÆMethodāÆTabāÆPageāÆTemplate.āÆInāÆactualāÆintegrationāÆāÆ
āÆāÆāÆāÆsimplyāÆincludeāÆthisāÆtemplateāÆtoāÆdesiredāÆlocation.āÆāÆ
āÆāÆāÆāÆ</iscomment>āÆāÆ
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆtabāÆwithāÆpaymentāÆoptionsāÆconditionāÆ</iscomment>āÆāÆ
<isifāÆcondition="${paymentOption.IDāÆ===āÆ'PROGRESSIVE_LEASING'}">āÆāÆ
āÆāÆāÆāÆ<isincludeāÆtemplate="checkout/billing/progressiveLeasingTab"āÆ/>āÆāÆ
</isif>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆtabāÆwithāÆpaymentāÆoptionsāÆconditionāÆ</iscomment>
2) Include following template along with condition in paymentOptionsContent.isml
<iscomment>āÆāÆ
āÆāÆāÆāÆThisāÆtemplateāÆisāÆoverriddenāÆtoāÆincludeāÆProgressiveāÆLeasingāÆāÆāÆ
āÆāÆāÆāÆPaymentāÆMethodāÆContentāÆPageāÆTemplate.āÆInāÆactualāÆintegrationāÆāÆ
āÆāÆāÆāÆsimplyāÆincludeāÆthisāÆtemplateāÆtoāÆdesiredāÆlocation.āÆāÆ
āÆāÆāÆāÆ</iscomment>āÆāÆ
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆcontentāÆwithāÆpaymentāÆoptions </iscomment>āÆāÆ
<isifāÆcondition="${paymentOption.IDāÆ===āÆ'PROGRESSIVE_LEASING'}">āÆāÆ
āÆāÆāÆāÆ<isincludeāÆtemplate="checkout/billing/progressiveLeasingContent"āÆ/>āÆāÆ
</isif>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆcontentāÆwithāÆpaymentāÆoptionsāÆ</iscomment>
See the default overridden templates in the cartridge for reference:
ā/progressiveleasing_sfra_changes /cartridge/templates/default/checkout/billing/paymentOptionsTab.ismlā
ā/progressiveleasing_sfra_changes /cartridge/templates/default/checkout/billing/paymentOptionsContent.ismlā
Add Progressive Leasing Payment Summary
In order to provide the progressive leasing payment summary in the order conformation page, include the following custom template into paymentOptionsSummary.isml template:
<iscomment>CustomāÆStart:āÆIncludeāÆprogressiveāÆleasingāÆsummaryāÆwithāÆpaymentāÆmethodāÆconditionāÆ</iscomment>āÆāÆ
<isifāÆcondition="${payment.paymentMethodāÆ===āÆ'PROGRESSIVE_LEASING'}">āÆāÆ
āÆāÆāÆāÆ<isincludeāÆtemplate="checkout/billing/paymentOptions/progressiveLeasingSummary"āÆ/>āÆāÆ
</isif>āÆāÆ
<iscomment>CustomāÆEnd:āÆIncludeāÆprogressiveāÆleasingāÆsummaryāÆwithāÆpaymentāÆmethodāÆconditionāÆ</iscomment>
See the default overridden templates in the cartridge for reference:
ā/progressiveleasing_sfra_changes /cartridge/templates/default/checkout/billing/paymentOptions/paymentOptionsSummary.ismlā
Add Progressive Leasing Payment Error
In order to provide the progressive leasing payment error, include the following custom template into checkout.isml template:
<iscomment>āÆCustomāÆStart:āÆAddāÆlogicāÆtoāÆrenderāÆProgressiveāÆLeasingāÆPaymentāÆError</iscomment>āÆāÆ
<isifāÆcondition="${!empty(pdict.paymentError)}"āÆ>āÆāÆ
āÆāÆāÆ<divāÆclass="alertāÆalert-danger"āÆrole="alert">āÆāÆ
āÆāÆāÆāÆāÆāÆ<pāÆclass="error-message-text">${pdict.paymentError}</p>āÆāÆ
āÆāÆāÆ</div>āÆāÆ
</isif>āÆāÆ
<iscomment>āÆCustomāÆEndāÆ</iscomment>
See the default overridden templates in the cartridge for reference:
ā/progressiveleasing_sfra_changes/cartridge/templates/default/checkout/checkout.ismlā
Updated over 3 years ago
