Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

One-Page Checkout - Warning user to click APPLY

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 06-18-2012, 07:15 PM
  Mish's Avatar 
Mish Mish is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 92
 

Thumbs up One-Page Checkout - Warning user to click APPLY

*** CODE UPDATED TO SUPPORT PRE JQUERY 1.7 ***

Hi guys,

I have found that a number of users have ended up not proceeding with orders because they didn't realease they had to click the APPLY button on the One Page Checkout page [Ajax checkout]. Essentially they would enter there name and address, then try enter their payment details by clicking on the "Credit Card" radio button. As you'd be aware, if someone hasn't clicked APPLY at the bottom of the name/address area, they can't select payment or shipping options etc. My users would get confused and leave. I found this out when one user called me.

I have modified X-Cart to generate a popup alert if the user attempts to click on anything in the Payment/Shipping area. Previously nothing would happen if they would try click in this area.

1> Open the file /skin/common_files/modules/One_Page_Checkout/ajax.checkout.js

2> Go to line ~590 and find the following function:

Code:
ajax.widgets.checkout.obj.prototype.disableCheckout = function() { if (!this.isReady() || !this.checkElement()) { return false; } this.disableCheckoutButton(); this.disablePaymentSelection(); this.disableShippingSelection(); }

Change it to read [note the new code inserted]:

Code:
ajax.widgets.checkout.obj.prototype.disableCheckout = function() { if (!this.isReady() || !this.checkElement()) { return false; } $("#opc_shipping_payment").click(function() { alert("Please click the APPLY button below the area where you entered your name and address."); }); this.disableCheckoutButton(); this.disablePaymentSelection(); this.disableShippingSelection(); }

3> Look immediately below that function, and find the following function:

Code:
// Widget :: enable checkout sections and button after profile change ajax.widgets.checkout.obj.prototype.enableCheckout = function() { if (!this.isReady() || !this.checkElement()) { return false; } if (!paypal_express_selected) { this.enablePaymentSelection(); } this.enableShippingSelection(); if (!this.enableCheckoutButton()) { var _s = this; this.timer_id_check_button = setInterval( function() { _s.enableCheckoutButton(); }, 2000 ); } }

Change that code to read [note the new line inserted]

Code:
// Widget :: enable checkout sections and button after profile change ajax.widgets.checkout.obj.prototype.enableCheckout = function() { if (!this.isReady() || !this.checkElement()) { return false; } if (!paypal_express_selected) { this.enablePaymentSelection(); } this.enableShippingSelection(); $("#opc_shipping_payment").unbind("click"); if (!this.enableCheckoutButton()) { var _s = this; this.timer_id_check_button = setInterval( function() { _s.enableCheckoutButton(); }, 2000 ); } }

Hope this helps.
__________________
X-Cart Gold 4.6.1
Reply With Quote

The following 12 users thank Mish for this useful post:
alinush (05-30-2013), CenturyPerf (07-18-2012), cflsystems (06-18-2012), chris.ath (08-16-2012), DavyMac (01-26-2013), eddy (08-22-2012), flyclothing (06-19-2012), gb2world (06-18-2012), photo (07-18-2012), qualiteam (06-19-2012), tartaglia (06-19-2012), zone1creative (07-03-2012)
  #2  
Old 06-18-2012, 08:12 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: One-Page Checkout - Warning user to click APPLY

That is a good one. Many customers are confused and leave because of the way XC OPS works
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 06-19-2012, 01:48 AM
  Mish's Avatar 
Mish Mish is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 92
 

Default Re: One-Page Checkout - Warning user to click APPLY

If people would prefer, I could make it so that the Center and right columns were not visible until the user clicked "APPLY". What do you guys think?
__________________
X-Cart Gold 4.6.1
Reply With Quote
  #4  
Old 06-19-2012, 08:25 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: One-Page Checkout - Warning user to click APPLY

It would have been way better actually if this page was in vertical up->down order instaed of horizontal left->right. If you hide the columns until info is entered there will be empty wasted space which is not looking good.
This is just another area (along with the address book) that needs a complete overhaul by QT
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 06-19-2012, 01:47 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: One-Page Checkout - Warning user to click APPLY

Quote:
generate a popup alert if the user attempts to click on anything in the Payment/Shipping area
What if it automatically triggered the Apply button instead?
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
  #6  
Old 06-19-2012, 01:56 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: One-Page Checkout - Warning user to click APPLY

Quote:
Originally Posted by cherie
What if it automatically triggered the Apply button instead?
But when? There are so many fields and not all required so you don't know when customer is finished entering data. Even if you assume that customer is finished entering personal info just because they tried to click on shipping/payment section - still they may have not finished and just wanting to see what happens... It has to be either all sections enabled and ajax updated or current way... which all agree is just not good
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 06-19-2012, 08:21 PM
  flyclothing's Avatar 
flyclothing flyclothing is offline
 

eXpert
  
Join Date: Aug 2004
Location: Gilbert, AZ
Posts: 357
 

Default Re: One-Page Checkout - Warning user to click APPLY

I added this and now the message applies even after applying address information. It now shows up when picking shipping, making payment, etc.
__________________
Jonathan
Flyclothing, LLC
PO Box 1490
Gilbert, AZ 85299-1571
P 480.422.7350
F 888.359.2568
www.flysportsgear.com?MMCF_xcartforum (X-Cart 4.5.2) FOR SALE
Reply With Quote
  #8  
Old 06-19-2012, 08:25 PM
  Mish's Avatar 
Mish Mish is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 92
 

Default Re: One-Page Checkout - Warning user to click APPLY

Did you insert the line:

$('#opc_shipping_payment').off('click');
__________________
X-Cart Gold 4.6.1
Reply With Quote
  #9  
Old 06-19-2012, 08:31 PM
  flyclothing's Avatar 
flyclothing flyclothing is offline
 

eXpert
  
Join Date: Aug 2004
Location: Gilbert, AZ
Posts: 357
 

Default Re: One-Page Checkout - Warning user to click APPLY

Yeah,

I definitely added both lines (and just deleted them). I had a customer tell us that the site just kept asking her to "APPLY" even though she already did. Had to remove the cose because it was causing more confusion to the already-confusing OPC.
__________________
Jonathan
Flyclothing, LLC
PO Box 1490
Gilbert, AZ 85299-1571
P 480.422.7350
F 888.359.2568
www.flysportsgear.com?MMCF_xcartforum (X-Cart 4.5.2) FOR SALE
Reply With Quote
  #10  
Old 06-19-2012, 08:32 PM
  Mish's Avatar 
Mish Mish is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 92
 

Default Re: One-Page Checkout - Warning user to click APPLY

You must have had something wrong with that line. That second line removes the onclick handler from the Shipping / Payments division. Shame you removed it, you should have cut and paste the code here
__________________
X-Cart Gold 4.6.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:21 PM.

   

 
X-Cart forums © 2001-2020