Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Checkout Redux [Support Thread]


ecartz

Recommended Posts

Link to Checkout Redux: http://addons.oscommerce.com/info/7019

 

This is a public Beta of an add on that rewrites the checkout process to do three things:

 

1. Insert orders in the database before redirecting to external payment processors (e.g. PayPal).

2. Shorten the checkout registration process by creating the account implicitly rather than explicitly.

3. Accelerate the checkout process by skipping steps where the user was just clicking a continue button.

 

The process goes somewhat like this: for users who are not logged in, they go to a checkout login page where they have the option of logging in or of entering a shipping address (billing address in the case of virtual products). If they enter a shipping address, it creates an account automatically, with a random password. The next step is to check if there is more than one shipping option; if there is, it will show the checkout shipping page and allow the customer to pick; if there is not, it will register the shipping method and skip to the payment page. On the payment page, it will again check if there is more than one option; if there is, it will let the customer pick; if there is not (or after the customer picks), it will go to the confirmation page.

 

After the customer confirms, it goes to checkout_process (always) and inserts the order. If the payment method includes a redirect, it will then do a form post via javascript (for users who do not have javascript enabled, they will have to click a continue button). When payment completes and redirects back to checkout_process, the email gets sent unless the payment module has a process_notification variable set. In that case, it will wait to send the email until the notification is received by the processor. For customers who registered during this checkout, an additional section will be added to the email that explains how they can activate their accounts.

 

If the customer cancels the transaction at the processor, the order will be marked cancelled and the products will be reloaded into the shopping cart. A store owner can browse these cancelled orders and optionally take actions to try to recover them (e.g. emailing the customer asking if there was a technical problem; offering a discount, etc.).

 

For a store that only has one payment method and one shipping method, the normal effect of all this will be for the checkout to consist of a login step, a confirmation step, payment, and a notification step. For all customers, it removes the shipping and payment selection steps (if not needed). For new customers, it also removes the click to go to registering an account and the click to continue after registering the account. What was a minimum of seven clicks for a new customer is now down to just three (checkout, submit address, confirm) plus anything extra required by the payment processor.

 

This add on includes a modified version of the PayPal Standard module that incorporates the notification method from the add on. Other payment modules with IPN style functionality would need to be modified to use the new method to take advantage of how this add on works. Fortunately, this consists mostly of deleting code from the payment module. The notification processor does need to be modified to include the emailing portion of the contribution, which is packaged into a module for reuse in that way.

 

The package also includes a Google Analytics integration (to demonstrate the advantages of some of the checkout success changes; contrast with the osCommerce Google Analytics module upon which it is very loosely based), alternate files for use with the DHTML State Selection add on, and an example of how to integrate another add on that changes the checkout_process.php file: Gift Voucher (GV) and Discount Coupons (DC) for RC1, RC2, RC2a.

 

Unfortunately, due to the completeness with which the add on changes checkout_process.php, it's not suitable for installation on modified stores (it can be done, but you really need to know what you are doing). The installation instructions require that you start with a clean osCommerce 2.2 RC2a store and copy over the existing files. Once you've done that, the installation instructions include information for integrating other add ons with the modified files, using the included integrations as examples.

Edited by ecartz

Always back up before making changes.

Link to comment
Share on other sites

small thing Matt in your order.php you've left off the closing ?>

the same in english/checkout_process, checkout_login, virtual_login

 

would actually seem you've done it on all your english files

 

 

(I'm adding it to my modded store - not bad so far ;) )

Edited by Xpajun

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

small thing Matt in your order.php you've left off the closing ?>

the same in english/checkout_process, checkout_login, virtual_login

 

would actually seem you've done it on all your english files

That's a Zend best practice: http://framework.zend.com/manual/en/coding...ding-style.html

 

As those files are pure PHP, there's no point in them switching to HTML context, which is what the ?> does. Doing so gives rise to problems with headers already sent, as white space at the end of the file is interpreted as content rather than whitespace. Unfortunately, there's not much that can be done with the <?php at the beginning of the file, since PHP does not have a supported way of including files as PHP code rather than HTML (I suppose that one could hack something together with eval).

Always back up before making changes.

Link to comment
Share on other sites

I think I've got it working - I say think because I can't get PayPal sandbox working properly :rolleyes:

 

Question: Can I alter checkout_redirect to look like the rest of my store, without causing a problem, as it looks bit bad at the moment. Would be alright on a standard store but not one that is centered and uses background images ;)

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

There is no reason why you can't customize the look of checkout_redirect; however, I would avoid putting links on that page. Thus, I would recommend against including the standard header, footer, and columns. Making it fixed width and centered would not be a problem. If the background images are getting cached properly, they shouldn't be a problem either. If they are not caching, they could slow down the page, which would be undesirable.

Always back up before making changes.

Link to comment
Share on other sites

Matt

 

I'm currently getting this error using sandbox:

 

Paypal does not allow your country of residence to ship to the country you wish to

 

Is this a module problem?

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Is this a module problem?
Well, I don't get that error, so my first guess would be no. :)

 

Anything is possible though. Have you tried using a different country? If it works for the US and fails for the UK, can you give me an example address? For the US, one that validates through PayPal is 1600 Pennsylvania Ave, Washington, District of Columbia, 20500. Other countries should have similar public addresses that can be tried, e.g. 10 Downing St in the UK.

 

Does this happen both with accounts created during checkout and with existing accounts?

 

To help with debugging this, I might turn off javascript in the browser and go through checkout. On the page that says that since you have javascript off, we can't redirect you automatically, do a view source. Somewhere in the HTML, you should have hidden inputs with country values. What are they?

Always back up before making changes.

Link to comment
Share on other sites

I got that working thanks - it was a PayPal thing

 

Next problem is the non sending of emails, which I know is not limited to your contribution, but your contribution relies on the sending of emails so I need to get it sorted

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Hi Matt

 

Just had a look and my site sends emails from contact us and email customer, but nothing is coming from your contribution at all

 

I have in root:

 

checkout_confirmation

checkout_login

checkout_payment

checkout_process

checkout_shipping_address

checkout_shipping

checkout_success

 

all of these have been modified to match my store layout but have no other add-ons

 

includes:

 

filenames

 

classes:

 

order

shopping_cart

 

modules:

 

checkout_cancel

checkout_notification

checkout_redirect

insert_order

 

checkout_redirect has been modified to match my store layout

 

payments:

 

paypal_standard

 

languages>>english:

 

checkout_login

checkout_process

virtual_login

 

languages>>english>>modules:

 

checkout_redirect

 

So where do I start looking :(

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Further to the above:

 

PayPal sandbox is being ignorant and not sending me any notification of payment made back to my site, so I have tested with check/money order module and have got the following results:

 

When I order and pay without an account - I receive no email

 

When I order and pay with an account - I receive email (this includes the new account of someone who has just paid without an account)

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

modules/checkout_notification.php and ext/modules/payment/paypal/standard_ipn.php send emails. If you are using the PayPal module that came with the contribution, the order email should come from the IPN module in ext. Are the order statuses updating? You should see a Preparing status and then a Pending status (or whatever your defaults are).

 

In ext/modules/payment/paypal/standard_ipn.php there is a line that says

  $send_debug_email = false;

You could try changing it to true to see if it tells you anything useful. Note that it requires that the debug email to be set in admin >> Modules >> Payment, under the settings for the paypal standard module.

Always back up before making changes.

Link to comment
Share on other sites

I hadn't uploaded the standard_ipn.php but it hasn't made a difference now that I have.

 

I get a Preparing status but not the Pending one

 

I've turned on send_debug_email but I can't see anything

 

Finally I've backed up to de-install and everything has worked properly through PayPal

 

Would you like me to PM you a copy of the debug_email?

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

  • 4 months later...

I have installed this contribution - and like it a lot. I do not want my customers to have to log in and remember a password. But, if they did decide to come back and buy more, I want to give them a chance of buying something else without giving them an error message that the email they would like to use is already in the system.

 

Does anyone know how to stop the contribution from doing this please?!

 

Thank you in advance

Link to comment
Share on other sites

  • 2 weeks later...
But, if they did decide to come back and buy more, I want to give them a chance of buying something else without giving them an error message that the email they would like to use is already in the system.
The relevant section of code is
        if ($check_email['total'] > 0) {
         $error = true;
         $email_exists = true;

         $messageStack->add('checkout_address', sprintf(ENTRY_EMAIL_ADDRESS_EXISTS_ERROR, tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')));
       }

However, I don't know that there is a simple fix that preserves the advantages of the current system. One possibility would be to delete the previous row or change the email address in it so that the new row could be added. That's what the Purchase without Account contribution does. E.g. something like

        if ($check_email['total'] > 0) {
         tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
       }

Note: I haven't tested this in any way.

Always back up before making changes.

Link to comment
Share on other sites

  • 4 weeks later...

Hi!

 

is there are any plans to make this contribution compatible with osC v3?

I do have to make it work (and I will eventually) but would like to get some tips or pointers.

care to help?

 

thanks & cheers

Link to comment
Share on other sites

  • 4 weeks later...

Great add-on Matt; I've applied it to a vanilla store to try it out and it's soooo much better than the default checkout.

 

I've been testing with Paypal sandbox and been successful with orders both confirmed & cancelled in Paypal, but if I use the 'back' button to return to the store it seems to be handled as a successful payment (have done this 3 times now in various routes). The most straightforward way is to back straight from the paypal login screen after going through from entering a shipping address and chosing payment method.

 

It's possible the store isn't as vanilla as I think as it's an ISP-provided setup via Fantastico but I've previously compared their installation with a download without finding any differences.

 

If this isn't a feature of the add-on I'd welcome a pointer on where to start looking into it.

 

The store is www.neo-lasers.co.uk/shop-one/

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Correction; it's not handled as a successful payment - the order status is set to cancelled. However, the success page is displayed instead of the choice of payment method page.

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Apologies for filling up the thread, but this time I waited till I've finished my Redux testing. You can thank Paypal for my finding this one as the sandbox is broken and won't successfully take a payment (thinks the invoice is already paid).

 

In a nutshell; when paypal payment is cancelled and another payment option chosen, the customer is given free shipping.

 

Initially, my store had only one shipping method set up; flat rate $5.

 

Add an item to the cart; go through checkout, through the no account route. Redux skips the shipping page, and when you get to order summary you can see it sets shipping to Flat rate and adds $5 to the order.

Choose paypal payment method, go into paypal and then cancel out - comes back to choice of payment method page.

Whatever you choose here, the next Order summary page still shows shipping as Flat rate but adds a charge of $0 to the order.

 

I repeated the above after setting up table rate shipping as well, without any difference so it's nothing to do with skipping the shipping page: after cancelling in paypal, the order confirmation page remembers the text of the shipping method but the price is set to $0.

 

I double checked a couple of things:

- the shipping charge is initially passed to paypal and shows there before cancellation

- if you go back eg. to edit the order comment before confirming the order, the shipping charge isn't lost

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

  • 5 weeks later...
  • 2 months later...

I was just checking in on this thread.. i found it because it was being touted as the next best thing to a single page checkout.. i'd definitely LOVE to use it.. but would like to know if anyone is out there using it and still supports it.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...