Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've had two use cases where a pop up for a checkout registration was needed. Would it be possible to integrate this module with colorbox for example? Or rather the overlay module?
Comments
Comment #1
vasike@Lukas von Blarer : Could you please share the scenario you have in mind.
Thank you
Comment #2
Lukas von BlarerI wanted to show a overlay as soon an anonymous user tries to checkout which requires him to log in. The overlay should then show the contents commerce_checkout_redirect displays.
Comment #3
Pallavi Gupta CreditAttribution: Pallavi Gupta as a volunteer commented@Lukas You can add a simple patch in commerce_checkout_redirect module to open login form in overlay .
function commerce_checkout_redirect_commerce_checkout_router($order, $checkout_page) {
// Get the id of the first and last checkout page
$checkout_pages = commerce_checkout_pages();
if($redirect_path == '') {
$redirect_path = 'user/login';
}
- return drupal_goto($redirect_path);
+ if(FALSE !== stripos(current_path(), 'checkout')) {
+ return drupal_goto('cart', array('fragment' => "overlay=$redirect_path", 'query'=> array('destination' => current_path())));
+ } else {
+ return drupal_goto($redirect_path);
+ }
}
Comment #4
Pallavi Gupta CreditAttribution: Pallavi Gupta as a volunteer commented