Disable User Registration & Offer Only Guest Checkout (Updated)

Hello everyone. I had posted an old solution to accomplish this, and several people posted that it no longer works with the latest version of CS-Cart. So, after upgrading, I redid a new version which does work.



It's very simple. You have to only update one file, and it works with both standard checkout and one-page checkout.



Edit this file: /skins/[YOUR_SKIN]/customer/views/checkout/components/setps/step_one.tpl



Look for lines 26-54, and either comment them out, or remove them completely. You also have to comment or remove the closing {/if} tag on line 72, right after the .



I have included a before and after, to help make this as easy as possible.



BEFORE:


{if ($settings.General.disable_anonymous_checkout == "Y" && !$auth.user_id) || ($settings.General.disable_anonymous_checkout != "Y" && !$auth.user_id && !$contact_info_population) || $smarty.session.failed_registration == true}



{include file="views/checkout/components/checkout_login.tpl" checkout_type="one_page"}








{include file="views/profiles/components/profiles_account.tpl" nothing_extra="Y" location="checkout"}
{include file="views/profiles/components/profile_fields.tpl" section="C" nothing_extra="Y"}

{hook name="checkout:checkout_steps"}{/hook}

{if $settings.Image_verification.use_for_register == "Y"}
{include file="common_templates/image_verification.tpl" id="register" align="center"}
{/if}


{include file="buttons/button.tpl" but_name="dispatch[checkout.add_profile]" but_text=$lang.continue}
 {$lang.or} 
{include file="buttons/button.tpl" but_href=$curl but_onclick="$('#step_one_register').hide(); $('#step_one_login').show();" but_text=$lang.cancel but_role="tool"}



{else}




{if $edit}

{include file="views/profiles/components/profile_fields.tpl" section="C" nothing_extra="Y" email_extra=$smarty.capture.email_extra}


{hook name="checkout:checkout_steps"}

{include file="buttons/button.tpl" but_name="dispatch[checkout.update_steps]" but_text=$but_text}

{/hook}

{/if}

{/if}




AFTER:






{if $edit}

{include file="views/profiles/components/profile_fields.tpl" section="C" nothing_extra="Y" email_extra=$smarty.capture.email_extra}


{hook name="checkout:checkout_steps"}

{include file="buttons/button.tpl" but_name="dispatch[checkout.update_steps]" but_text=$but_text}

{/hook}

{/if}



Please reply if you found this useful.



I will continue posting my customizations if people are using them.

[quote name='trevorgehman' timestamp='1309803459' post='116244']

Hello everyone. I had posted an old solution to accomplish this, and several people posted that it no longer works with the latest version of CS-Cart. So, after upgrading, I redid a new version which does work.



It's very simple. You have to only update one file, and it works with both standard checkout and one-page checkout.



Edit this file: /skins/[YOUR_SKIN]/customer/views/checkout/components/setps/step_one.tpl



Look for lines 26-54, and either comment them out, or remove them completely. You also have to comment or remove the closing {/if} tag on line 72, right after the .



I have included a before and after, to help make this as easy as possible.



BEFORE:


{if ($settings.General.disable_anonymous_checkout == "Y" && !$auth.user_id) || ($settings.General.disable_anonymous_checkout != "Y" && !$auth.user_id && !$contact_info_population) || $smarty.session.failed_registration == true}



{include file="views/checkout/components/checkout_login.tpl" checkout_type="one_page"}








{include file="views/profiles/components/profiles_account.tpl" nothing_extra="Y" location="checkout"}
{include file="views/profiles/components/profile_fields.tpl" section="C" nothing_extra="Y"}

{hook name="checkout:checkout_steps"}{/hook}

{if $settings.Image_verification.use_for_register == "Y"}
{include file="common_templates/image_verification.tpl" id="register" align="center"}
{/if}


{include file="buttons/button.tpl" but_name="dispatch[checkout.add_profile]" but_text=$lang.continue}
 {$lang.or} 
{include file="buttons/button.tpl" but_href=$curl but_onclick="$('#step_one_register').hide(); $('#step_one_login').show();" but_text=$lang.cancel but_role="tool"}



{else}




{if $edit}

{include file="views/profiles/components/profile_fields.tpl" section="C" nothing_extra="Y" email_extra=$smarty.capture.email_extra}


{hook name="checkout:checkout_steps"}

{include file="buttons/button.tpl" but_name="dispatch[checkout.update_steps]" but_text=$but_text}

{/hook}

{/if}

{/if}




AFTER:






{if $edit}

{include file="views/profiles/components/profile_fields.tpl" section="C" nothing_extra="Y" email_extra=$smarty.capture.email_extra}


{hook name="checkout:checkout_steps"}

{include file="buttons/button.tpl" but_name="dispatch[checkout.update_steps]" but_text=$but_text}

{/hook}

{/if}





Please reply if you found this useful. I will continue posting my customizations if people are using them.



Oh, and if you want to remove the “Sign in as a different user” link, just remove this line:


Does this work in CS-Cart Version 3.0.1? I can't seem to get it to.

Hi William

Did you get this to work in 3.0.1?

Hello trevorgehman



Is this working for 3.0.1 version?



Regards

Hi Trevorgehman



I can not see the changes you refer to be making in the updated changes in order to make it work in 3.0.1.



Can you please repost the changes you have made, making it work for 3.0.1?

It would be really appreciated.

Sorry guys, I have not used CS Cart 3.x yet, so this only works for the older version.

Use the attached file for Version 3.0.4



Rename checkout_login.tpl to checkout_login.tpl.bak to make a backup.



Extract and Upload the attached file to: /skins/[YOURSKIN]/customer/views/checkout/components



Clear your cache in admin by calling http://yourstoredoma…om/admin.php?cc



That should be it.



Only Guest Checkout option is displayed and selectable.



I tried to build this as an override but can't seem to figure it out.

checkout_login.zip

How about for Version 4.x??

Anyone know how to use guest checkout only in version 4.2.2?

Finally: