In order to place credit messaging beneath the order total on the cart page, we should create a Views area handler similar to the area handler used to render the cart order’s total price field. The area handler will need to accept an order as an argument and then render the messaging div / load the JS library.
The configuration for the area handler should let the merchant specify the “Placement” as being either “Cart” or “Payment.” If they’re adding this to the commerce_cart_form View, it would be “Cart”, and if to the commerce_checkout_order_summary, it would be “Payment.” Either way, it should properly set the “amount” to the order total so the messaging can use the right numbers.
Comment | File | Size | Author |
---|---|---|---|
#5 | paypal-credit-messaging-checkout.png | 328.64 KB | rszrama |
#2 | 3174251-2.credit_messaging_area_handler.patch | 5.08 KB | rszrama |
Comments
Comment #2
rszrama CreditAttribution: rszrama at Centarro commentedPatch attached adds an area handler and makes an explicit exception to avoid conflicting SDKs included on the relevant checkout paths. We'll need to follow-up with PayPal support to ensure we have some way to render these elements on the same page; otherwise the cart page cannot include any credit messaging if it includes payment buttons.
Comment #4
rszrama CreditAttribution: rszrama at Centarro commentedCommitted.
Comment #5
rszrama CreditAttribution: rszrama at Centarro commentedScreenshot attached for checkout.
Comment #6
karengrey CreditAttribution: karengrey at Centarro commented