Persisting Custom Checkout Fields between page loads

General ShopSite user discussion

Persisting Custom Checkout Fields between page loads

Postby SheriC » Wed Jun 17, 2009 9:42 am

I have created close to thirty custom checkout fields on the checkout screen (Commerce setup --> Checkout). One problem that I have is that I need the data stored in the fields to persist in these two cases:

1. If during the form validation of the Bill to or Payment data on the Checkout page, it finds an error, instead of clearing my custom checkout fields I need it to persist the data on the checkout page.

2. If the Checkout page validates and the user is taken to the Confirmation page, they review the order and need to Make Changes, i.e. They click on the Make Changes button, the custom checkout fields are cleared and the user must reenter all of the data.

What I need is a way to use non-persistent cookies or session variables. I don't want the data persisting beyond the scope of a users session. If anyone has a way to solve the problem I'm open to any suggestions.

I'm assuming the only way to do this is in the Checkout page and to add JavaScript to the built in Check-it function.

It seems like I need to call a function from the onLoad() function based upon all the example JavaScript code I am finding. Not sure if there is a location within ShopSite to add code during the onLoad event?

Has anyone ran into this problem or know of a solution that they could share with me? I'd appreciate some details on how to do this and hopefully some sample code.

Thank you
SheriC
 
Posts: 11
Joined: Wed Jun 17, 2009 8:42 am

More info

Postby SheriC » Wed Jun 17, 2009 9:46 am

Version of ShopSite is 10.0
SheriC
 
Posts: 11
Joined: Wed Jun 17, 2009 8:42 am

Postby kirbyglad » Wed Dec 09, 2009 1:03 am

I'm having the same problem - did you figure out a resolution?
kirbyglad
 
Posts: 10
Joined: Mon Dec 07, 2009 2:21 pm
Location: Orem, Utah

Re: Persisting Custom Checkout Fields between page loads

Postby SheriC » Tue Sep 21, 2010 6:04 am

ShopSite v 10 Sp2

Is there a way to persist data in Custom CheckOut fields?

I had this problem a year ago and was not able to resolve it as I was unable to access the code required to persist the cookies.

Wanted to check back and see if there has been a fix since then.

I have created Custom Fields in the CheckOut. I need to persist the values entered into the controls (textboxes, dropdowns etc.) between page loads.
If the user enters data into the Custom Fields and they press submit and have not entered required values in the custom fields, all data entered in the custom fields is lost.

To create a cookie form save javascript code I need access to the following:

1. Copy the coding into the HEAD of your HTML document (can do this)
2. Add the onLoad event handler into the BODY tag (not sure where to access this)
3. Put the last coding into the BODY of your HTML document (can do this)
4. Add save_field(this.fieldname) to the onSubmit handler (not sure where to access this?)

Has anyone else been able to find a way to accomplish this task, either with JavaScript or another way?

Please advise if there is a workaround for this.

Thanks!
SheriC
 
Posts: 11
Joined: Wed Jun 17, 2009 8:42 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 98 guests