Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced multiple dispatch events in login form for other themes. #1407

Merged
merged 1 commit into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
*/
/** @var $this Mage_Checkout_Block_Onepage_Login */
?>
<?php $isAllowedGuestCheckout = $this->getQuote()->isAllowedGuestCheckout() ?>
<div class="col2-set">
<?php echo $this->getChildHtml('login_before')?>
<div class="col-1">
<h3><?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('Register to Create an Account') ?><?php endif; ?></h3>
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
<h3><?php if($isAllowedGuestCheckout): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('Register to Create an Account') ?><?php endif; ?></h3>
<?php if($isAllowedGuestCheckout): ?>
<p><?php echo $this->__('Register with us for future convenience:') ?></p>
<?php else: ?>
<p><strong><?php echo $this->__('Register and save time!') ?></strong><br />
Expand All @@ -46,15 +47,15 @@
<li><?php echo $this->__('Easy access to your order history and status') ?></li>
</ul>
<?php endif; ?>
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
<?php if($isAllowedGuestCheckout): ?>
<ul class="form-list">
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
<?php if($isAllowedGuestCheckout): ?>
<li class="control">
<input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo $this->__('Checkout as Guest') ?></label>
</li>
<?php endif; ?>
<li class="control">
<input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo $this->__('Register') ?></label>
<input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$isAllowedGuestCheckout): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo $this->__('Register') ?></label>
</li>
</ul>
<h4><?php echo $this->__('Register and save time!') ?></h4>
Expand Down Expand Up @@ -100,7 +101,7 @@
<div class="col-1">
<div class="buttons-set">
<p class="required">&nbsp;</p>
<?php if ($this->getQuote()->isAllowedGuestCheckout()): ?>
<?php if ($isAllowedGuestCheckout): ?>
<button id="onepage-guest-register-button" type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo $this->__('Continue') ?></span></span></button>
<?php elseif ($this->helper('checkout')->isCustomerMustBeLogged()): ?>
<button id="onepage-guest-register-button" type="button" class="button" onclick="window.location='<?php echo $this->helper('checkout/url')->getRegistrationUrl();?>'"><span><span><?php echo $this->__('Register') ?></span></span></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*/
/** @var $this Mage_Checkout_Block_Onepage_Login */
?>
<?php $isAllowedGuestCheckout = $this->getQuote()->isAllowedGuestCheckout() ?>
<div class="col2-set">
<div class="col-1">
<h4><?php echo $this->__('Login') ?></h4>
Expand Down Expand Up @@ -68,8 +69,8 @@
</div>
<?php echo $this->getChildHtml('login_before')?>
<div class="col-2">
<h4><?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('Register to Create an Account') ?><?php endif; ?></h4>
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
<h4><?php if($isAllowedGuestCheckout): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('Register to Create an Account') ?><?php endif; ?></h4>
<?php if($isAllowedGuestCheckout): ?>
<p><?php echo $this->__('Register with us for future convenience:') ?></p>
<?php else: ?>
<p><strong><?php echo $this->__('Register and save time!') ?></strong><br />
Expand All @@ -79,18 +80,18 @@
<li><?php echo $this->__('Easy access to your order history and status') ?></li>
</ul>
<?php endif; ?>
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
<?php if($isAllowedGuestCheckout): ?>
<ul class="form-list">
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
<?php if($isAllowedGuestCheckout): ?>
<li class="control">
<input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo $this->__('Checkout as Guest') ?></label>
</li>
<?php endif; ?>
<li class="control">
<input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo $this->__('Register') ?></label>
<input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$isAllowedGuestCheckout): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo $this->__('Register') ?></label>
</li>
<li class="buttons-set">
<?php if ($this->getQuote()->isAllowedGuestCheckout()): ?>
<?php if ($isAllowedGuestCheckout): ?>
<button id="onepage-guest-register-button" type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo $this->__('Continue') ?></span></span></button>
<?php elseif ($this->helper('checkout')->isCustomerMustBeLogged()): ?>
<button id="onepage-guest-register-button" type="button" class="button" onclick="window.location='<?php echo $this->helper('checkout/url')->getRegistrationUrl();?>'"><span><span><?php echo $this->__('Register') ?></span></span></button>
Expand Down