Jump to content

Disable guest checkouts? Sell only to registered users.


RossF1984

Recommended Posts

Hi,

Seems like such a simple thing but how do I stop guests from being able to checkout? I need all users to register as I have to validate certain criteria before I allow an order to be processed (I only sell to the trade not general public). Seems crazy that there does not appear to be an option for this in the Admin pages.....?

Kind regards.

Ross

Link to comment
Share on other sites

I found this from a previous post:

Open the skin template file content.checkout.confirm.php.

Find this section:

<div class="row">
   <div class="small-12 large-8 columns"><input type="checkbox" name="register" id="show-reg" value="1" {$REGISTER_CHECKED}><label for="show-reg">{$LANG.account.create_account}</label></div>
</div>
<div id="account-reg">
   <h3>{$LANG.account.password}</h3>

Change the first line to

<div class="row hide">

Can anyone advise as to how this will disable the ability to checkout as a guest?

Link to comment
Share on other sites

I am not sure about the above.

But, in admin, Store Settings, Features tab, Misc. section, check the box for "Hide prices until logged in". This also effectively inhibits adding items to the shopping basket, and deters visitors from checking out.

Link to comment
Share on other sites

Thanks for the reply.

I tried the above and it essentially forces the user to register before checking out.

This still, unfortunately, allows a user to make a purchase without being "vetted" first.

The products on my store are only supposed to be available to trained professionals so I need to be able to restrict who buys them.

I have an add-on that sets a user to "disabled" when they register, allowing me to set them to active when I have received their relevant documents. But the above code appears to be bypassing this as registration is happening at checkout and not by selecting the link at the top of the store.

Your mentioned method would work however I want to still be able to display the prices to unregistered users as to attract customers. Although they would still need to register and provide documentation to be able to make a purchase.

I need to be able to hide the ability to "add to basket" if a user is not registered and logged in on all products.

Nightmare. 😢😢😢

Link to comment
Share on other sites

The edit to the template above makes invisible the checkbox that allows a guest to deselect the intent to create an account. I believe that the module "Disable Registered Customers" will then catch the registration process and make the customer disabled. (Honestly, I need to check that out.)

I had also thought of CubeCart's "Catalogue Mode". This still shows prices, but completely shuts down the ability for anyone to make a purchase.

Well, obviously, that won't work for you.

Let me see if I can tie in a test to see if a registered customer is logged in, coupled with Catalogue Mode, to switch off Catalogue Mode for that logged-in customer.

Link to comment
Share on other sites

Let's try this:

In /classes/gui.class.php, near line 249, find:

$GLOBALS['smarty']->assign('CATALOGUE_MODE', $GLOBALS['config']->get('config', 'catalogue_mode'));

Change to:

$GLOBALS['smarty']->assign('CATALOGUE_MODE', $GLOBALS['config']->get('config', 'catalogue_mode') || !User::getInstance()->is());

This sets the skin's behavior to Catalogue mode if the visitor is not logged in.

The visitor would need to know a lot about CubeCart to manually create custom POST payloads in an attempt to add items to the Shopping Basket.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...