How can we show a login/register page on clicking a submit button or a link on a page ?
Can we write some php code in the backend to do the same or will it be on the smarty template only?
Can we write some php code in the backend to do the same or will it be on the smarty template only?
You can use pre controller and the following code in php:
if (empty($auth['user_id']) && empty($auth['order_ids'])) { return array( CONTROLLER_STATUS_REDIRECT, 'auth.login_form?return_url=' . urlencode(Registry::get('config.current_url')) ); }