Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
Page 1 of 2
Disable User Registration and Compare Products
 
bine
Jr. Member
 
Total Posts:  17
Joined:  2008-08-22
 

Hello,

is there a possibility to disable the feature “compare products”? i don’t need this.
another question: i want to disable the functionality of customer login and registration.
how can i do that? i’ve tried to deactivate module “Mage_Customer”, but it works only until i want to proceed to checkout. after i done this, i have the possibility to login or register.

thanks a lot for your answer

 
Magento Community Magento Community
Magento Community
Magento Community
 
geoffT
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-05-22
 

I’m wondering if you ever learned how to disable account creation/login.  I’m looking to do the same thing; guest checkout only.  Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Celo
Jr. Member
 
Total Posts:  5
Joined:  2008-07-18
 

Im after exactly the same thing...guest checkout only.

can someone please look into this or point me in the right direction.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
geoffT
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-05-22
 

I ended up hiring someone to help me with this.  His solutions was to use this code in place of everything below the Magento copyright info in app/design/frontend/{interfacename}/{templatename}/template/checkout/onepage/login.phtml

Please click “Continue” to start the checkout process.
    
        <
div class="buttons-set">
            <
button class="button" onclick="checkout.setMethod();"><span><?php echo $this->__('Continue'?></span></button>
        </
div>
   
    <
script type="text/javascript">
    
//<![CDATA[
        
var loginForm = new VarienForm('login-form'true);
        $(
'login-email').observe('keypress'bindLoginPost);
        $(
'login-password').observe('keypress'bindLoginPost);
        function 
bindLoginPost(evt){
            
if (evt.keyCode == Event.KEY_RETURN{
                loginForm
.submit();
            
}
        }
    
//]]>
    
</script>

 
Magento Community Magento Community
Magento Community
Magento Community
 
geoffT
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-05-22
 

Sorry - I just realized I’m missing something for this to work - not sure what yet (I’m trying to use this on a new site).  Will post when I figure it out…

 
Magento Community Magento Community
Magento Community
Magento Community
 
geoffT
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-05-22
 

OK - I think I figured it out.  The setMethod function in opcheckout.js needs to be modified.

Change

setMethod: function(){
        
if ($('login:guest') && $('login:guest').checked{
            this
.method 'guest';
            var 
request = new Ajax.Request(
                
this.saveMethodUrl,
                
{method'post'onFailurethis.ajaxFailure.bind(this), parameters{method:'guest'}}
            
);
            
Element.hide('register-customer-password');
            
this.gotoSection('billing');
        
}
        
else if($('login:register') && ($('login:register').checked || $('login:register').type == 'hidden')) {
            this
.method 'register';
            var 
request = new Ajax.Request(
                
this.saveMethodUrl,
                
{method'post'onFailurethis.ajaxFailure.bind(this), parameters{method:'register'}}
            
);
            
Element.show('register-customer-password');
            
this.gotoSection('billing');
        
}
        else{
            alert(Translator
.translate('Please choose to register or to checkout as a guest'));
            return 
false;
        
}
    }
,

to

setMethod: function(){
           this
.method 'guest';
            var 
request = new Ajax.Request(
                
this.saveMethodUrl,
                
{method'post'onFailurethis.ajaxFailure.bind(this), parameters{method:'guest'}}
            
);
            
Element.hide('register-customer-password');
            
this.gotoSection('billing');
    
},

Again, I didn’t program this and I’m not a programmer so I likely can’t answer any questions about it.  Just posting to help anyone else trying to achieve the same.  Good luck.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Chad P. Statham
Jr. Member
 
Total Posts:  7
Joined:  2008-12-13
 

So will this code then skip the “Checkout Method” and go straight to billing?

I see this is being done at https://wpmilesgiftcard.nwa.com/

Where Billing shows up as the first step in the checkout process workflow.

-- Chad

 
Magento Community Magento Community
Magento Community
Magento Community
 
siegeaudio
Jr. Member
 
Total Posts:  3
Joined:  2008-12-01
 

Looking at the NWA link, I’ve arrived at a very simple solution to disable account creation for guest only checkout.

Replace the contents of app/design/frontend/{interfacename}/{templatename}/template/checkout/onepage/login.phtml with the following code:

[REDACTED] see below.

 
Magento Community Magento Community
Magento Community
Magento Community
 
imagebox
Jr. Member
 
Total Posts:  17
Joined:  2009-02-10
 

This is what I did:

File: Template/cart/onepage/login.phtml

Replaced -

<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
            
<ul class="form-list">
                
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
                
<li>
                    <
input type="radio" name="checkout_method" id="login:guest" value="guest" checked="checked"/>
                    <
label for="login:guest"><?php echo $this->__('Checkout as Guest'?></label>
                </
li>
                
<?php endif; ?>
                
<li>
                    <
input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()=='register' || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?>/>
                    <
label for="login:register"><?php echo $this->__('Register'?></label>
                </
li>
            </
ul>
            <
strong><?php echo $this->__('Register and save time!'?></strong><br/>
            
<?php echo $this->__('Register with us for future convenience:'?>
            
<ul class="disc">
                <
li><?php echo $this->__('Fast and easy check out'?></li>
                <
li><?php echo $this->__('Easy access to your order history and status'?></li>
            </
ul>
        
<?php else: ?>
            
<input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />
        
<?php endif; ?>

With -

<input type="hidden" name="checkout_method" id="login:guest" value="guest" checked="checked" />
<
script type="text/javascript">
    
Event.observe(window'load', function() {
        checkout
.setMethod();
    
});
</script>

Then I used some css to hide step 1:

li#opc-login.section.allow {
    
display

Keep in mind that the section will now start on number 2.. You can edit onepage.phtml to disable numbering:

<span class="step-count"><?php echo $i ?></span>

 
Magento Community Magento Community
Magento Community
Magento Community
 
pss7_
Sr. Member
 
Total Posts:  80
Joined:  2008-10-09
Austria
 
imagebox - 17 March 2009 08:13 AM

This is what I did:
Then I used some css to hide step 1:

li#opc-login.section.allow {
    
display
]

where?

 
Magento Community Magento Community
Magento Community
Magento Community
 
siegeaudio
Jr. Member
 
Total Posts:  3
Joined:  2008-12-01
 

As it turns out, due to a checkbox bug in Internet Explorer (all versions including 8) my previous code doesn’t execute properly on IE. After doing some digging, I’ve gotten a fix working for all browsers.

This, to me, seems like the most efficient solution for enabling guest-only (non-registered) checkout in Magento, as it doesn’t require hacking any of the established logic for the one-page checkout in opcheckout.js.

Replace the contents of app/design/frontend/{interfacename}/{templatename}/template/checkout/onepage/login.phtml with the following code:

<input type="hidden" name="checkout_method" id="login:guest" value="guest" checked="checked" />
<
script type="text/javascript">
    
Event.observe(window'load', function() {
        
// fix for IE
        
var cb = $("login:guest");
        
cb.checked true;

        
checkout.setMethod();
    
});
</script>

Hopefully this helps someone.

 
Magento Community Magento Community
Magento Community
Magento Community
 
David Quinn Carder
Jr. Member
 
Total Posts:  8
Joined:  2009-08-03
 

siegeaudio, that was very helpful—thank you—but your instructions are a little off, so I’m going to clarify them for anyone that comes across this thread in future.  The following works flawlessly, at least in Safari 4.

There are three changes you need to make.  Two of them are in onepage.phtml.  First, <i>find and delete</i> the following tag:

<span class="step-count"><?php echo $i ?></span>

Then, replace the entire script at the end of the file with the following:

<script type="text/javascript">
//<![CDATA[
    
var accordion = new Accordion('checkoutSteps''.head'true);
    
<?php if($this->getActiveStep()): ?>
    accordion
.openSection('opc-<?php echo $this->getActiveStep() ?>');
    
<?php endif ?>

    
var checkout = new Checkout(accordion,{
        progress
'<?php echo $this->getUrl('checkout/onepage/progress') ?>',
        
review'<?php echo $this->getUrl('checkout/onepage/review') ?>',
        
saveMethod'<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
        
failure'<?php echo $this->getUrl('checkout/cart') ?>'}
    
);
//]]>
</script>

Do not replace all the original code, just the script at the end.

You’re through with onepage.html.  Now we need to add one line to boxes.css.  Find:

#opc-login .button-set { border-top:0; }

and replace it with:

#opc-login { display:none; }

There, you’re done!  Why disabling registration isn’t an option in the ACP is beyond me, but then again, my entire store is one big workaround.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dartmaul
Member
 
Avatar
Total Posts:  36
Joined:  2009-09-06
 

Just to be clear - does this bypass the checkout method step and take users straight to billing address?

Thanks..

 
Magento Community Magento Community
Magento Community
Magento Community
 
nish
Jr. Member
 
Total Posts:  5
Joined:  2008-03-12
Rickmansworth
 

great help but small correction to above post, instead of removing step numbers, you can use like this;

<span class="step-count"><?php echo $i-1 ?></span>

notice -1 after $i which will reduce a one step from the count. wink)

 
Magento Community Magento Community
Magento Community
Magento Community
 
WOS_Webmaster
Jr. Member
 
Total Posts:  5
Joined:  2009-10-25
 

Regarding the use of accounts and forcing customers to check out as guests, I thought the following was best in case someone stumbles across this thread…
(You don’t need to do all of the above and only 2 files require an edit and yes the step numbers are correct)

Edit:  /app/design/frontend/default/detault/layout/checkout.xml

Comment out the reference to the “checkout.onepage.login” addLink under the checkout_onepage_index section.

<!-- <block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml"/> -->

Edit:  /app/design/frontend/default/default/template/checkout/onepage.phtml (at the bottom of the page, add after the </ol>)

<input type="hidden" name="checkout_method" id="login:guest" checked="checked" value="guest"/>
<
script type="text/javascript">
//<![CDATA[
var accordion = new Accordion('checkoutSteps''.head'true);
<?php if($this->getActiveStep()): ?>
accordion
.openSection('opc-billing');
<?php endif ?>

 
var checkout = new Checkout(accordion,{
progress
'<?php echo $this->getUrl('checkout/onepage/progress') ?>',
review'<?php echo $this->getUrl('checkout/onepage/review') ?>',
saveMethod'<?php echo 
$this->getUrl('
checkout/onepage/saveMethod') ?>',
failure'<?php echo $this->getUrl('checkout/cart') ?>'}
);
var 
cb = $("login:guest");
cb.checked true;
checkout.setMethod();
//]]>
</script>

 
Magento Community Magento Community
Magento Community
Magento Community
 
saintsjd
Jr. Member
 
Total Posts:  26
Joined:  2008-12-03
 

Thanks WOS_Webmaster. Your solution is simple and works great for me on Magento 1.3.x.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2
 
© Copyright 2010 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
277226 users|1053 users currently online|346982 forum posts