X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Force to payment page if only one payment method is avail. (https://forum.x-cart.com/showthread.php?t=4840)

lsemel 10-19-2003 12:58 PM

Force to payment page if only one payment method is avail.
 
My store has exactly one payment method: credit card. On checkout, X-Cart shows a screen with one radio button, marked "Credit Card: Visa, Mastercard, etc.". This is ridiculous and I want to skip this screen entirely.

How can I get rid of this screen and have it skp directly to the next screen? There's so much logic mixed up in these Smarty templates it's impossible to tell what's going on, or how changing the templates will break other aspects of the product.

B00MER 10-19-2003 01:31 PM

Code:

        # force to payment page if only one payment method is available       
        if(!$payment_methods[1]){       
                func_header_location("cart.php?mode=checkout&paymentid=".$payment_methods[0][paymentid]);       
        }


Add the above to customer/cart.php after the following code:

Code:

#
# Show checkout page with payment options only methods availiable to current
#  membership level are displayed
#
        $membership = $user_account["membership"];
        $payment_methods=func_query("select * from $sql_tbl[payment_methods] where active='Y' AND (membership='' OR  membership='$membership') order by orderby");


\:D/

inky 11-23-2003 04:21 PM

Hi Boomer, Is it possible to skip payment method selection page in case of more than one payment methods? May be the selection of payment methods can be made at "step-1" instead of a having seperate page.
In short, my goal is to shorten the steps. Ideally I would like just ONE page to checkout no matter how bad it looks. :D

B00MER 11-23-2003 10:06 PM

:arrow: https://adobe.site-secure.net/profiledoctor/store/customer/cart.php

Kinda like this? :wink:

atlas 11-24-2003 01:06 PM

force to payment page since 1 payment method
 
Hello,
You had suggested this:

# force to payment page if only one payment method is available
if(!$payment_methods[1]){
func_header_location("cart.php?mode=checkout&payme ntid=".$payment_methods[0][paymentid]);
}

I am placing this in the right spot that you've recommended, but when I have this code in there, the page just comes up blank at that point. Any suggestions?

Thanks,
Kevin

B00MER 11-24-2003 10:02 PM

Is CreditCard your only method of payment?

atlas 11-25-2003 08:05 PM

Skip payment method selection screen
 
Hi - thanks for the quick response. Yes - credit card is the only payment method. When you get to the payment method screen, Credit Card is the only available option and you have to click the radio button and next to get to where they're going.

Any ideas?

http://thebeachwaterpark.com/shop/customer/home.php

Thanks,
Kevin

Quote:

Originally Posted by B00MER
Is CreditCard your only method of payment?


B00MER 11-26-2003 08:48 AM

The above mod was done with 3.4.x not 3.3.x, could possibly be the culprit.

inky 11-28-2003 11:20 PM

Hi Boomer, I can't get the cart working, I mean the link you have provided. Though I couldn't see, I would say any simplyfication of checkout will be appreciated. I have removed unimportant text boxes, but would be great to merge the steps. I know that the "selection of payment method" step is not dependent on the previous step, so why can't we merge it with the previous step? Thanks for looking into this.

typologist 08-28-2007 11:16 AM

Re: Force to payment page if only one payment method is avail.
 
I spent 1 hour trying to implement this, and finally noticed that this is implemented by default in 4.1.8, lol, so this hack is not necessary in newer versions.


All times are GMT -8. The time now is 06:06 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.