Mail Bag

Answering Your Questions Since... 9:30am
Joined: 28 Aug 2005
Posts: 113
|
Posted: Feb 12, 2008 11:31am Post subject: Skip Certain Checkout Pages based on what the Customer Buys |
|
|
| Quote: | Hello,
I'm trying to streamline the checkout process in my store. For example, some of my products are digital. Since digital products don't require shipping, I'd like the customer to skip the shipping options if they're buying digital products only.
Also, I'd like returning customers to skip the checkout page that asks for their billing address, since this will already be on file.
This is how I have set up my store's checkout process...
Checkout Page 1: New Customer vs. Returning Customer "Login Challenge" page.
Checkout Page 2: Billing address, email and password fields.
Checkout Page 3: Shipping address fields and shipping method selection.
Checkout Page 4: Coupon redemption & PayPal button.
Any tips on reducing the number of steps in my checkout process will be appreciated! |
Hello,
Based on the checkout you described, we've written a tutorial outlining how you can achieve the desired behavior of the checkout process with just a few minor additions to your checkout pages' templates.
The instructions below assume the checkout steps are:
Checkout Page 1: New Customer vs. Returning Customer "Login Challenge" page.
Checkout Page 2: Billing address, email and password fields.
Checkout Page 3: Shipping address fields and shipping method selection.
Checkout Page 4: Coupon redemption & PayPal button.
The desired paths through the checkout area can be achieved by adding some additional QuickCode Tags to several of the checkout page's templates. Following are instructions on how the requested results could be achieved.
PAGE: CHECKOUT 1 (New Customer vs. Returning Customer "Login Challenge" page.)
| Quote: | | "...If the returning customer is only ordering downloads, I would like them to go directly to page 4 of checkout to pay through PayPal..." |
To bypass the "login challenge" page when the customer is only purchasing downloads, add the following five QuickCode Tags to the very beginning of the checkout1 page's template:
{IF-ORDER-USES-SHIPPING-BEGIN}{NULL}{ELSE}{REDIRECT-NEXT-CHECKOUT-PAGE}{IF-ORDER-USES-SHIPPING-END}
Let's look as what each of these QuickCode Tags does:
{IF-ORDER-USES-SHIPPING-BEGIN}
This tag triggers a review of the products in the customer's order. If ANY products that require shipping are found, then the next command in the series will be performed. Since "digital" products don't require shipping, the next command will be skipped.
{NULL}
This is the command being performed if the order contains ANY shipped products. "{NULL}" translates to "load the page as usual".
{ELSE}
This tag tells the store to do something else if the customer's order doesn't contain ANY products that require shipping. (The customer's order contains all digital products.)
{REDIRECT-NEXT-CHECKOUT-PAGE}
When this command is triggered, the store will instantly skip to the next page in the checkout process. This is the QuickCode Tag that allows you to give the illusion of going directly to the next page.
{IF-ORDER-USES-SHIPPING-END}
This QuickCode Tag tells the store to stop its review of the products in the customer's order.
In plain English, this series of QuickCode Tags above translates to: "If the order contains shipped products, load the page as usual. Otherwise, skip to the next page in the checkout process."
PAGE: CHECKOUT 1 (New Customer vs. Returning Customer "Login Challenge" page.)
| Quote: | | "...If the returning customer is ordering a Tangible item, then I would like them to go to page 3 of checkout..." |
This can be achieved by adding another group of QuickCode Tags similar to the previous group to the top of the checkout1 template. This group of QuickCode Tags will tell the store to bypass the "login challenge" page if the customer is recognized as a returning customer:
{IF-CUSTOMER-LOGGED-IN-BEGIN}{REDIRECT-NEXT-CHECKOUT-PAGE}{IF-CUSTOMER-LOGGED-IN-END}
The "IF-CUSTOMER-LOGGED-IN..." set of QuickCode Tags checks to see if the customer's account information is already on file in the server's memory. If so, the store will recognize them as a returning customer, and skip to the next page in the checkout process.
NOTES:
A) You may use both groups of QuickCode Tags on the same page. (For example: {IF-ORDER-USES-SHIPPING-BEGIN}{NULL}{ELSE}{REDIRECT-NEXT-CHECKOUT-PAGE}
{IF-ORDER-USES-SHIPPING-END}{IF-CUSTOMER-LOGGED-IN-BEGIN}{REDIRECT-NEXT-CHECKOUT-PAGE}{IF-CUSTOMER-LOGGED-IN-END}) The store will simply run one check, and then the other.
B) When using these tags, be sure that they are the VERY FIRST thing in the template. If there's any other characters in the template prior to these tags, even a space, it will cause a warning message to be displayed. (This is due to a restriction in the way the server will perform the skip to the next checkout page.)
PAGE: CHECKOUT 1 (New Customer vs. Returning Customer "Login Challenge" page.)
| Quote: | | "...The customer that wants to create an account would go to page 2 of checkout to create account..." |
Simply point the "Checkout and create a customer account" link to "checkout2.php".
PAGE: CHECKOUT 1 (New Customer vs. Returning Customer "Login Challenge" page.)
| Quote: | | "...If the customer does not want to create an account, they would go to either page 3 for Tangible item on page 4 for downloads to pay with PayPal..." |
Point the "Checkout but don't create a customer account" link to "checkout3.php". Then, add the following QuickCode Tags to the beginning of the checkout3 template to handle skipping over page 3 if the customer is only ordering digital products:
{IF-ORDER-USES-SHIPPING-BEGIN}{NULL}{ELSE}{REDIRECT-NEXT-CHECKOUT-PAGE}{IF-ORDER-USES-SHIPPING-END}
PAGE: CHECKOUT 2 (Billing address, email and password fields.)
| Quote: | | "...This is where the customer would create their account. After, they would go to page 3 if ordering a Tangible item or directly to page 4 for a download order. (Originally the customer accounts were not being created, so I used {FORCE-REGISTER}.)..." |
Using the {FORCE-REGISTER} QuickCode Tag is exactly what you should do here. Since PayPal requires that the customer completes their transaction on PayPal's website, the store's unable to create the customer's store account at the end of the PayPal payment process. The {FORCE-REGISTER} will tell the store to create the customer's account NOW, before they've left for PayPal's website.
PAGE: CHECKOUT 3 (Shipping address fields and shipping method selection.)
| Quote: | | "...This page would only be used if the order requires shipping of a tangible item..." |
As mentioned above, to achieve this behavior, add the following QuickCode Tags to the beginning of the checkout3 template:
{IF-ORDER-USES-SHIPPING-BEGIN}{NULL}{ELSE}{REDIRECT-NEXT-CHECKOUT-PAGE}{IF-ORDER-USES-SHIPPING-END}
PAGE: CHECKOUT 4 (Coupon redemption & PayPal button.)
| Quote: | | "...This page is used by all customers to check out with PayPal..." |
It's not necessary to add any QuickCode Tags to this page's template, because this has been handled by the previous pages in the checkout process. This page should be fine as it is!
I hope this information helps clarify the steps you can take to produce the checkout behavior you desire. If you have any additional questions regarding the instructions above, just let us know. We're happy to help however we can.
Tip:
The "{IF-...}" QuickCode Tags can also be used within the page to hide certain content. For example: The "{IF-ORDER-USES-SHIPPING-BEGIN/END}" tags could be used on a one page checkout design to hide the shipping options if the order doesn't require shipping.
Review: QuickCode Tags Used in this Tutorial:
Each of the tags listed below links to its QuickCode Tag Glossary definition.
{IF-ORDER-USES-SHIPPING-BEGIN}
{NULL}
{ELSE}
{REDIRECT-NEXT-CHECKOUT-PAGE}
{IF-ORDER-USES-SHIPPING-END}
{IF-CUSTOMER-LOGGED-IN-BEGIN}
{IF-CUSTOMER-LOGGED-IN-END}
{FORCE-REGISTER} _________________ Modular Merchant Mail Bag
Answering your questions, queries and puzzlers.
Modular Merchant shopping cart software, website hosting, and custom programming. |
|