close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Advice on how best to integrate a JavaScript spot the ball style competition with eCart

Thread began 11/22/2016 7:42 pm by Nathon Jones Web Design | Last modified 2/09/2017 2:12 pm by Ray Borduin | 977 views | 16 replies |

Nathon Jones Web Design

Advice on how best to integrate a JavaScript spot the ball style competition with eCart

When the user gets to the page (see link below) they will have already selected which product they are playing for, in this case a car. Each car will have a ticket price which entitles the user to one co-ordinates selection. When that selection is made, the details of the co-ordinates should be added to cart along with the ticket price.

It would need to check that the particular co-ordinates were not already in the cart.

What is the best way to approach this as it occurs to me that selecting the co-ordinates should be the 'add to cart' function? I'm not sure how to convert the selection on my sample page to work in this way.

Would appreciate any advice you could offer.
Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Can two different players have the same coordinates?

I think your existing script could be augmented to make sure the same coordinates aren't picked more than once. Just add unique ID values for your hidden fields and loop through the existing ones to make sure that it wasn't already added.

You could then do the add to cart all at once and do a secondary check as it is actually added.

This might be a good candidate for a premier support ticket. I should be able to help you with the necessary adjustments without much difficulty but it will certainly involve some hand coding both in the client javascript and php.

Sign in to reply to this post

Nathon Jones Web Design

HI Ray. Thank you for getting back to me on this and I'd be happy to arrange a Premier Support Ticket session to get this sorted out.
When would suit you to do that?

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Just fill out the support request on this page: http://www.webassist.com/premier_request.php

Include a good US phone number or Skype contact information and suggest a date and time when you would be available.

Sign in to reply to this post

Nathon Jones Web Design

Originally Said By: Ray Borduin
  Can two different players have the same coordinates?  



Yes.

Originally Said By: Ray Borduin
  I think your existing script could be augmented to make sure the same coordinates aren't picked more than once. Just add unique ID values for your hidden fields and loop through the existing ones to make sure that it wasn't already added.


You could then do the add to cart all at once and do a secondary check as it is actually added.  



It would also need to check a users purchase history to ensure that they hadn't already selected a particular set of coordinates during a previous purchase. Would you be able to cover that in our Premium Support Ticket session?

Originally Said By: Ray Borduin
  This might be a good candidate for a premier support ticket. I should be able to help you with the necessary adjustments without much difficulty but it will certainly involve some hand coding both in the client javascript and php.  



Will just go and book that in with you. Would you be available tomorrow / Wednesday at all?
Thank you Ray.

Regards
NJ

Sign in to reply to this post

Nathon Jones Web Design

Ray,

You said, during our last premier support session, that you should be able to help me with a couple of wee changes to the array for the spot the ball selection - namely a way to prevent users from selecting coordinates that they might have selected in a previous purchase.

Firstly though is there an easy way, during the initial selection process, to allow a user to cancel a particular selection?

I've provided FTP and website login credentials below.

I also have a problem with the checkout page. When the user enters their billing address details and clicks "Continue", the "Please Wait" option appears but then it just reloads the checkout page. I assume there must be an error with the save to database or something, but how to do view what that error might be?

Appreciate the help, as ever. Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

We added code to the page that would prevent adding the same spot more than once. It depends on populating an array of previously selected spots. You could create a recordset to look up previous orders and pre-populate that array with the previously purchased values to prevent the same spot from being added by the same person again.

The checkout isn't working because it appears all of the content has been removed from the confirm_cart.php page. Usually when the continue button is pressed on the checkout form, that form is hidden and the confirm_cart page is displayed with a final checkout button. Since the confirm_cart page is blank the process is stalled at that point.

You can probably run the wizard again with new page names to get the necessary content for the confirm_cart page. I'm not sure how or when it was removed.

I would be able to help fix those problems in a premier support ticket if you have difficulty.

Sign in to reply to this post

Nathon Jones Web Design

I've re-run the wizard and now the checkout page is blank white.
I'm actually completely confused about what's happening at this point as each attempt to run the checkout wizard has failed.
URL and login details are in the post above.

Hope you can help.
Thank you.
NJ

EDIT:

Urggh. The Wizard keeps dropping this line into the confirm.php page:
<?php require_once("webassist/ecart/checkout/credentials/gateways.php"); ?>

...yet it doesn't create gateways.php at any stage in the process.

I'm going to try to work through this as much as I can without a premier support ticket as I can't keep resorting to that every time the WebAssist extension decides to throw odd code into a page.

You had mentioned that you'd help me, in the forum, with populating the array with previously selected/purchased spots. I understand that I'll need to create a recordset on the page that calls purchases by that customer, for the same competition, however it also needs to check whether it's for the same car ID.

Hopefully be back to you later but I sense a long night ahead.
Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

It might be easiest to just create a blank page at that location: webassist/ecart/checkout/credentials/gateways.php

That way you don't have to keep deleting the references to it. You must be checking out without payment? It should create that file any time the wizard has a payment gateway selected.

Sign in to reply to this post

Nathon Jones Web Design

Ray, my Add to Cart button isn't working since I re-ran the checkout page. I've tried fixing it but I can't resolve it. Page is attached.
Is it possible to only have the Add to Cart button displayed when at least one selection has been made?

Also, is there any way to add a link that removes a co-ordinate selection?

Thank you.
NJ

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...