I am having a slight problem with the checkout page. If you click on the Change Country button it fails forcing you to check the accepted T&Cs box first and then when it returns you to the form it has removed the check. I kind of get why it removes it but I don't see that you need to read the T&Cs before you change the country you live in. I assume I need to add an option to
I still haven't solved this and I really don't thing you should have to ticke the T&C b4 you change the country esp when you return to the main form you have to tick the T&Cs again. Surely someone else has fixed this before?
I think the agreement to the terms and conditions is fine, as a check mark, but, I think the link to the actual terms and conditions should be a popup. This may solve your issue. Just a thought.
(I see you very active here, with the ecommerce plugin. It's good. You are trying to work through issues. I am new to SilverStripe's ecommerce module, so, I am working through the code and the documentation.)
Interesting idea but the problem is not with the acutal link to the T&Cs. The issue is two fold:
1. when I click on the Change Country button, the "t&c are a required field message appears " and I can't use the Change COuntry Button until I check the T&Cs box,
2. then having returned from the Change Country screen the T&C checkbox is unchecked again.
Ideally I would like to remove the need to going to a seperate screen to select a different country by replacing the change country button with a dropdown list on the country field, this would remove the validation issue and would also remove the issue of not being able to get the country to default when you you remove the members login option and usean anonomous purchase process but as the code that creates this form is quite comlex I have struggled with this.
I had a play with this and I removed that field from my custom ecommerce installation on my last project, replacing it with a dropdown. My code for this is at work, but basically it's just a matter of modifying the constructor on OrderForm.php.
I just installed oscommerce in my sandbox out of curiosity on that method you posted. Even the comment above it says:
* Disable the validator when you're calling ChangeCountry
Which is exactly what it's not doing for you. Adding some quick debug code to that method proves it's not being fired. Not on 2.3.3 at least. OrderForm extends Form, which is located in /sapphire/forms/ and a text search in that file shows the method doesn't exist.
Just did a quick check for "beforeProcessing" in trac. Looks like a known bug. http://open.silverstripe.org/ticket/4055. It seems beforeProcessing used to work, but no longer. May have been superceded by validate() or just removed from core.