Here are the steps how to re-produce this bug, hard to explain so I just write the step one by one:

  1. In the checkout page. Check this "My billing information is the same as my delivery information"
  2. Do not fill all required fields of "Delivery information"
  3. Click "Review order"
  4. Than error message displayed and .... "Billing information" expanded even the checkbox still checked!
  5. Now, fill all required fields in "Delivery information"
  6. Click "Review order"
  7. BUG: Ubercart ask you to fill the "Billing information"

Comments

scoutbaker’s picture

cha0s’s picture

Assigned: Unassigned » cha0s
cha0s’s picture

Unfortunately, I'm not sure if this is possible given the way checkout panes are currently set up. It doesn't appear that panes have access to each other at the 'process' stage, which I believe is where such copying should be taking place. This also sucks for anyone without Javascript, as well... although I think checkout is already broken without Javascript in various ways...

Hopefully Ryan/Lyle can shed some insight on this, but I couldn't find it.

rszrama’s picture

Assigned: cha0s » Unassigned
Status: Active » Postponed

Yeah, this is a tricky issue. The robust fix will need to be postponed, but this issue can be re-opened if someone wants to figure out a way to get that box to "uncheck" itself if an error occurs. The reason it's checked is b/c the Forms API remembers that it was checked when the form was submitted.

gooddesignusa’s picture

So i know this isn't a real fix. Using jquery to detect if there is an error and if so just uncheck that box. I threw this in my page.tpl.php file obviously up inside the head tag. Maybe this can hold some people over lol. Any error will uncheck that box so i guess that kinda sucks but whatever.

<?php if($_GET['q'] == "cart/checkout"){ ?>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
$(function(){
	if( $("div.error").length == 1 ){
		$("input#edit-panes-billing-copy-address:checkbox:checked").attr("checked", "");
	}
});
//--><!]]>
</script>
<? } ?>
xibun’s picture

just came across the same issue... just a thought: can clicking "Review order" not copy all Delivery information into Billing information in case that "My billing information is the same as my delivery information." is enabled?

far less important but related: the "... field is required." message shouldn't appear twice when the "My billing information is the same as my delivery information." is enabled.

tr’s picture

Status: Postponed » Active

Opening this back up so we can work on a fix.

jenileigh’s picture

Has anyone found a fix for this?

jenileigh’s picture

Sorry for multiple postings, put it looks like if you take out this line in your custom theme: print $scripts this feature doesn't work. Put it back in and it works. I hope this helps someone out there!

spacebunny’s picture

Wow thanks for the post jenileigh, it helped resolved my problem. I accidentally removed this line in the new theme.

Also want to point out that the page to insert print $scripts is page.tpl.php (right after print $styles; is a good place).

longwave’s picture

Status: Active » Closed (won't fix)

Not worth fixing this now in 6.x-2.x.