Jump to content

New Ajax Order Form


ExsysHost

Recommended Posts

Matt: will this allow us to add our own server side field validation? We had to add some in to the current order form using javascript and it's really ugly.... not to mention a major hassle whenever we want to upgrade...

Link to comment
Share on other sites

  • Replies 124
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

We did this with WHMCS here, was waiting for beta access to test AJAX form - but never received it so coded our own using XAJAX, the WHMCS API and hooks for fulfillment.

 

Still some code cleanup (especially with the javascript) but it does work well for us. We have some stuff in there to check for date of birth (older than 18), existing members, etc in addition to working with the WHMCS promo code database to determine the validity of the codes.

 

http://bit.ly/a1yB9T

Edited by xiconsulting2
Link to comment
Share on other sites

I would have to say that after creating such an advanced script and completely coding many custom behaviors, functions, and what not - WHMCS has been extremely flexible even with closed code. We were able to do everything we had set out to do, although it takes a little more time, its very simple to easily create new API functions.

 

We additionally have created an entirely new support frontend Adobe AIR application with Flex - which was based on some of the existing API functions along with some new ones we created (we converted all of the API calls into REST format to make sure the structure of all of our API calls are the same regardless of the underlying script). Many of the custom API functions work directly through the database, or make multiple calls using the WHMCS API. We also utilize the subaccounts feature, but in a different way (for spouse accounts).

 

At first it seemed a bit hopeless with closed source, but with some creativity, patience, and a decent amount of php - pretty much any obstacle can be overcome.

 

Anyone could create a form similar to this, would have been nice to get beta access though as it woulda been nice to test and provide some feedback.

Link to comment
Share on other sites

@xiconsulting2

 

So did your order form make its orders by using the API, or did you just modify the origional order form and add some API calls in to it?

 

I really like what I see on yours and hopefully WHMCS's can be customized to resemble...

 

I think it is key to show people how much they are saving for term selection and the terms of service like you have done.

Link to comment
Share on other sites

@xiconsulting2

 

looks like I will be following your route... just tested and the new official ajax order form does not degrade gracefully for people who don't have javascript enabled...

 

The proper way would to have all the form elements as html then hide them with a javascript library as needed for slide effects.

 

 

Any pointers you have to set me in the right direction would be much appreciated.

Link to comment
Share on other sites

@xiconsulting2

 

So did your order form make its orders by using the API, or did you just modify the origional order form and add some API calls in to it?

 

I really like what I see on yours and hopefully WHMCS's can be customized to resemble...

 

I think it is key to show people how much they are saving for term selection and the terms of service like you have done.

 

The actual processing takes place by calling individual functions and passing them along to other functions depending on the outcome, there definitely are optimizations to be made - but basically we used our own validation via PHP/xajax, and if all validates, pass it along to various API functions.

 

1. Validate form, return the errors if there are any

 

2. if ok, process payment (again with our service, they HAVE to have paid before we establish their account, we do not want to be using an invoicing system for the first order because it confuses the elderly, we had an 80 year old woman sign up for our service with the old WHMCS template based form, and she did not know what to do to pay an invoice - we have since provided better instructions for users) (pass transaction ID to next function)

 

3. Then use API Create Client (our clients service does not allow any more than one product per user, so at least for our needs there is no login form to "pre-fill" the account information, although it could definitely be done) (pass client id to next function)

 

4. Then API add order (pass order id/invoice id/transaction id/client id to next function)

 

5. Then API mark invoice, pass client id and order ID to next function

 

6. Then API accept order, pass client id to next function

 

7. Finally, do create module function and in XAJAX we do:

 

$redirecturl = "https://whmcs.domain.com/members/dologin.php?username=$email&password=$password&goto=authentication";
$objResponse->redirect($redirecturl, 0);

 

which does a redirect to log the user in and then provides the page where their order is confirmed and they may continue to activate their account.

 

Of course between each of these steps, we needed to account for an error in processing, or if there is some snag between the database or WHMCS, chaining these functions needs to be logged, so we do keep a log of what is going on during the order - and return a jquery growl alert telling the user to not submit their order again and to contact customer support. We also disable the submit button during and after processing until errors are corrected.

 

Sorry its a little confusing, it was a unique situation but we plan to clean it up a little more or if possible do everything directly with the DB and pass the API altogether.

Link to comment
Share on other sites

  • 2 weeks later...

Yeah we are getting anxious, we rolled a new site and are waiting on the realease of the new system before customizing the cart.

 

We have always had customers calling because they have issues with figuring out how to use the cart, some people get confused at the many buttons like Update cart... we are hoping to streamline this process for these type of customers with this new order form.

Link to comment
Share on other sites

yeah, sigh can't keep to time lines.

 

That's why they don't give release dates. Their priority is to make sure the release is stable and bug free and they won't release it until it is.

 

If they give a release date say they'll try to release something within a certain time period and don't, then the complaints come rolling in.

 

I would much prefer the way it is. I want and need fully tested and stable releases. In fact, I'll wait a while before upgrading, checking the forums often to make sure there weren't any problems before upgrading.

 

I guess if you are in such a hurry, you could see if you could receive the beta releases, but, please, don't try to push them to put out a release early. They won't do it and justifiably so.

Link to comment
Share on other sites

Software development never can keep to timelines... making claims to such deadlines just results in buggy code... look at the catastrophe known as modernbill for a perfect example.

 

On the same note, I really wish WHMCS had a bug tracker that was public so we could watch the progress in action, I think this would really put peoples anxieties at ease.

Link to comment
Share on other sites

That's why they don't give release dates. Their priority is to make sure the release is stable and bug free and they won't release it until it is.

 

If they give a release date say they'll try to release something within a certain time period and don't, then the complaints come rolling in.

 

I would much prefer the way it is. I want and need fully tested and stable releases. In fact, I'll wait a while before upgrading, checking the forums often to make sure there weren't any problems before upgrading.

 

I guess if you are in such a hurry, you could see if you could receive the beta releases, but, please, don't try to push them to put out a release early. They won't do it and justifiably so.

 

Your point is so moot as they did give a time line. I never asked once when it would be ready but I expect when they say when it will be ready we will be able to download the new version.

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
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated