Jump to content
pRieStaKos

Force login before Checkout

Recommended Posts

Hello,

Anyone know how to force login/register before Cart Review & Checkout ? I'm looking to do it with URL redirect, but WHCMS doesn't have URL redirect feature like WP.

Any suggestions ?

Thank you in advance.

Share this post


Link to post
Share on other sites
15 minutes ago, pRieStaKos said:

Anyone know how to force login/register before Cart Review & Checkout ? I'm looking to do it with URL redirect, but WHCMS doesn't have URL redirect feature like WP.

effectively, you're suggesting that before anyone can get to the cart, they need to be logged in (if an existing client), or register first (which then effectively makes them a client as they will become logged in after registration) ?

you could use a ClientAreaPageCart hook that detects if they're logged in and if they're not, redirects them elsewhere... now elsewhere could be clientarea.php to login as a client, or register.php if they're not.... of course, if they're not logged in, there's no way to know either way, so that's a conundrum.

I suppose you could display a custom modal message for those not logged in to say they need to be logged in or register before ordering and give them two redirection buttons (login / register).... although I suppose that may put off some potential customers if they need to register before they can order.

out of curiosity, any particular reason why you want to do this?

Share this post


Link to post
Share on other sites

@brian! to give you a heads up of another issue.

I wanted to drive the visitor from my main page to WHMCS cart from a product form that contains configuration options. But first I wanted to push him/her to the login/registration after the page form and then to checkout.

Now the new issue I got is that I want to point the visitor to cart but first clean the cart from previous add-to-cart products. Just add one product per configuration setup from main page form. Not WHMCS. At second step, the rest steps of WHMCS cart.

I tried posting the `a=empty` and `a=startover` for any submission of my page form before `a=add&pid...` URL values, but the previous product is on cart, unless I empty cart manually.

Edited by pRieStaKos

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated