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

vasike’s picture

Version: 7.x-2.0-beta1 » 7.x-2.x-dev
Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

@Lukas von Blarer : Could you please share the scenario you have in mind.
Thank you

Lukas von Blarer’s picture

Status: Postponed (maintainer needs more info) » Active

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

Pallavi Gupta’s picture

@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);
+ }

}

Pallavi Gupta’s picture

Assigned: Unassigned » Pallavi Gupta
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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