Author Topic: Need a way to remove the customer account creation fuctionality  (Read 9428 times)

Offline bladerunner

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
    • View Profile
I have looked at all the popular eCommerce solutions and they all include the ability for a user to register for an account.

I do not wish to have users create accounts.  I require only the user ability to add items to the cart and checkout as a guest.  Believe it or not, I will not have returning customers.

What would be the most elegant way to remove the account login and registration functionality from the store?

I understand I probably will not be able to change the core of the AbanteCart system to remove this function, but I will be happy if I could do it elegantly on the front end to prevent its use.

Offline bladerunner

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
    • View Profile
Re: Need a way to remove the customer account creation fuctionality
« Reply #1 on: March 27, 2015, 03:09:59 AM »
I have read most of the code and I believe I have figured out what I need to do, however I am stuck.

When on the shopping cart "rt=checkout/cart" and you click the checkout button it is actually onclick="save_and_checkout('checkout/shipping')" which is a javascript function that sends you to "next_step"

Without modification this will send you to rt=account/login

For what I want, I need "next_step" to send me to rt=checkout/guest_step_1

It looks like I need to change 'next_step' in /storefront/controller/pages/checkout.php, but I cannot find it in there.

I have no idea where to find this.  I am looking through the database.  PHP is coming back to me, but I am stuck.  Please help.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5835
  • Karma: +275/-2
    • View Profile
Re: Need a way to remove the customer account creation fuctionality
« Reply #2 on: March 27, 2015, 07:09:56 AM »
Hi.

In case you need only page redirection try
redirect with .htaccess

Offline bladerunner

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
    • View Profile
Re: Need a way to remove the customer account creation fuctionality
« Reply #3 on: March 27, 2015, 11:09:26 AM »
I solved this.  It might be sloppy, but it works.

In /storefront/view/default/template/pages/checkout/cart.tpl

I changed all of the <?php echo $checkout_rt; ?> to 'checkout/guest_step_1'

I still need to work on my PHP MVC skills, because I don't even understand where and how  $checkout_rt is being populated.

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Need a way to remove the customer account creation fuctionality
« Reply #4 on: June 15, 2017, 03:30:00 PM »
I have the same goal as bladerunner did 2 years ago.  Basically removing all aspects of "account" and "registration" from the AC site. 

I used his described method to redirect the 2 Checkout buttons on the cart page to guest_step_1. 

It works. 

I also removed the "Guest Checkout" title from guest_step_1 and guest_step_2, so those pages now look like standard checkout pages. 
Method: in /template/pages/checkout/guest_step_1.tpl and also in /template/pages/checkout/guest_step_2.tpl
comment out line 2:    <span class="maintext"><?php echo $heading_title; ?></span> 

My problem: I have not been able to figure out how to redirect the Checkout Icon link in cart_top to guest_step_1. 

I have 2 questions:

1.) Is the bladerunner approach described below a "suitable & stable" approach, or is there a better way?

2.)  How to redirect cart_top checkout icon link to guest_step_1? 

I'll keep working on this, but any tips would be appreciated. 

Thanks. 

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Need a way to remove the customer account creation fuctionality
« Reply #5 on: June 15, 2017, 04:59:39 PM »
OK, i found a way to redirect the cart_top checkout icon link to guest_step_1:

Go to id_1/template/blocks/cart_top.tpl, change line 29 instance of

href="<?php echo $checkout; ?>"   

to

href="/index.php?rt=checkout/guest_step_1"

It's pretty blunt, but it works, and I basically understand why it works. 
I don't really understand exactly why the bladerunner approach worked, so I may go back and try my url-direct approach on the 2 checkout buttons on the cart page.   

I would still like to hear if these two hacks are a really bad idea from a functional or security standpoint. 
I know they're ugly and un-eloquent, but I don't speak php so it's the best i can do without guidance. 

Thanks.

 

 

Powered by SMFPacks Social Login Mod