2004 Posts in 533 Topics by 435 members
E-Commerce Modules
SilverStripe Forums » E-Commerce Modules » Use Shipping Address Issue
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1528 Views |
-
Use Shipping Address Issue

15 October 2009 at 1:29pm
How does one stop the validators when one clicks "use different shipping address". This issue has been annoying the hell out of me. Next to this how does one prevent the form fields being cleared when OrderForm useDifferentShippingAddress function does a redirectBack()
These two issues are a major usability problem.
Has anyone sorted them out appart from removing the use different shipping address fields which are actually a useful feature?
-
Re: Use Shipping Address Issue

16 October 2009 at 5:45pm
Extend the validator to either cut the JS altogether or get to writing some Prototype to skip on click from the href selector
class MyAwesomerValidator extends RequiredFields {
public function javascript() {
// return ''; to get rid of all validation// or do something smart like
if ($this->form->Name() == 'ShippingForm'){ add smart custom code }
}}
The next step would be to use useCustomClass() to replace the annoying shipping form to one that extends it and uses the MyAwesomerValidator instead. Or if you write it smartly you could replace RequiredFields instead.
As for the redirectBack(), that is just not how things work. Don't forget this module is still in beta.
-
Re: Use Shipping Address Issue

10 November 2009 at 1:05am Last edited: 10 November 2009 1:05am
+1 for thinking this is pretty annoying.
(ps: did you succeed at turning it off?)
-
Re: Use Shipping Address Issue

23 December 2009 at 10:59am
Agreed, annoying as hell. The ecommerce module has so many usability quirks/annoyances that it's practically unusable without significant modification. I guess that's why it's still in beta, and is an unsupported module. Maybe one of these days when I have some free time (ha!) I'll put together and post a version of the module that includes the basic set of changes I make every time I'm forced to use it. Word on the street is that the next version of SS will use jQuery instead of Prototype, which would be nice.
To fix the problem mentioned here, I modified the OrderForm so that it always shows a Shipping Address fieldset with a checkbox at the top (Ship to Billing Address) that auto fills from the billing to the shipping fields. Then I do all the validation with jQuery. It's not perfect, but it's infinitely more usable than the default, in my opinion.
See www.yellowstonecheese.com/checkout/ as an example.
-
Re: Use Shipping Address Issue

11 March 2010 at 11:33pm
Hey guys,
I've been working on an eCommerce site and i got round this by overriding the validate() method in OrderForm.php.
I copied the method, and replaed the first if condition with:
if($this->validator && !isset($_REQUEST['action_useDifferentShippingAddress']) && !isset($_REQUEST['action_useMemberShippingAddress'])){
Hope that helps you guys.
-
Re: Use Shipping Address Issue

6 January 2012 at 4:21pm
Hi there,
I'm trying to fix someone else's code, and running into the form fields being cleared when OrderForm useDifferentShippingAddress function does a redirectBack() issue. Anyone found a solution for it in the end to prevent fields to be cleared? Please help.
Thanks a lot.
Sam
| 1528 Views | ||
|
Page:
1
|
Go to Top |




