4 replies [Last post]
zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Was this information Helpful?

Hi there,

Today I show how to order to the future store owner, he find the one page checkout system excellent, and the admin order system awesome. Thank you Ubercart !

However, we identify a small bug that is a little annoying, especially for customers that have some difficulties to navigate on the internet.

In the checkout pane, Imagine you fill all the field, you get a shipping quote, but you forget one required field for example.

So the system say : "field xxx is required", ok, but, the shipping quote is not kept.

So basically the customer will fill the missing field, and try to validate again but he will not get a shipping quote, so, he will be redirected on the same page that say, "you must select a quote etc....".

So, it should be very good to keep the quote informations if the customer make a mistake in the checkout pane.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Keep quote selection setting in checkout

+1 to the idea. I think it was working in earlier versions.

spiderman's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/17/2007
Juice: 61
bump

just want to bump this, as I've been getting reports from SCW of the same problem occurring frequently to their customers.

i'm going to try and track this down, but would love to have some pointers from the folks who know this code best. anybody have ideas where to begin looking for this problem? i have a sense that it has to do with the javascript/ajax magic that happens when the checkout pane is first loaded (and it *not* happening when the form is reloaded with errors)- but no idea where/how to track this down..

thanks!
derek

spiderman's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/17/2007
Juice: 61
still no luck

i've now spent several hours banging my head against this one (ow!) and it seems my jQuery/javascript skillz are just not up to snuff, atm. however, here's what i have managed to illuminate:

0. there's no tags for the different shipping quote radio buttons that appear when you click the "calculate shipping" button, or when you complete your delivery address (the first time) -- so don't go looking for them in the view-source.

1. the code that generates the radio buttons is function displayQuote in ubercart/shipping/uc_quote/uc_quote.js (around line 103 or so, if i'm reading it right), but has no apparent provision for "checking" one of these as it's writing them, based on any default/previous selection.

2. the displayQuote function is called on success of the previous function quoteCallback, after it makes an ajax call to the drupal callback at cart/checkout/shipping/quote (function uc_quote_request_quotes in uc_quote.module). it passes in the details of what products are in the order to uc_quote_request_quotes, and receives back a JSON object representing the available quote options, but apparently nowhere passes (or receives) info about which quote should be checked (if any)

3. the .change functions defined on the input radiobuttons (around line 113 of displayQuote in uc_quote.js) registers a line item with the set_line_item function call (defined in uc_payment/uc_payment.js), which continues to appear on the form (with the correct info) after the form reloads with an error.

all of this would lead me to believe that it should be possible to use the line_item elements of the document (put there by set_line_item) could be used to have quoteCallback/displayQuote notice that there was a quote already selected, and check it when the page reloads.

i'm trying hard to wrap my head around how to accomplish all of this, and while i'm sure i can do it, i suspect someone more skilled could come up with the answer faster, if they have time (and speed up my learning, to boot!). if not, i am committed to learning enough jquery/js magick to work my way through this knothole.

thanks!
derek

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: still no luck

Have you tried the latest code from Bazaar? I added some inline JavaScript to the uc_quote.module file to handle the default value of the quote selection. If it still doesn't work, I'll look into it some more.