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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama created an issue. See original summary.

rszrama’s picture

Patch 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.

  • rszrama committed 0b3586a on 8.x-1.x
    Issue #3174251 by rszrama: Create a credit messaging area handler for...
rszrama’s picture

Status: Needs review » Fixed

Committed.

rszrama’s picture

Screenshot attached for checkout.

karengrey’s picture

Component: PayPal / IPN » User experience

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.