alexm Posted June 28 Share Posted June 28 Afternoon @kongondo, Hope you are good! I've just implemented a custom form following your setup closely on the github demo and when I proceed to confirmation screen I get Call to member function first() on null in modules/Padloper/includes/helper/PadloperUtilities.php:1470 I've attached screenshots to see if you have any clue. I've got tax set up and a rate specified for United Kingdom and the built in checkout rendered process works, so I must be missing something, but I'm unsure what exactly. Many thanks as always, Alex Link to comment Share on other sites More sharing options...
Spinbox Posted June 28 Share Posted June 28 Hi Alex, Had the same problem, seems like the padloper input names have changed. They are now camelcase. The specific problem comes from shippingAddressCountry. It can't find the country. $customFormFields = [ // first name [ // the name of the input of the custom form 'input_name' => 'firstName', // the input type (for sanitization) // @todo: @note: for selects and checkbox, use the expected value type 'type' => 'text', // if field/input is required 'required' => true ], // last name [ 'input_name' => 'lastName', 'type' => 'text', 'required' => true ], // email [ 'input_name' => 'email', 'type' => 'email', 'required' => true ], // address line one [ 'input_name' => 'shippingAddressLineOne', 'type' => 'text', 'required' => true ], // address line two [ 'input_name' => 'shippingAddressLineTwo', 'type' => 'text', ], // city/town [ 'input_name' => 'shippingAddressCity', 'type' => 'text', 'required' => true ], // postcode [ 'input_name' => 'shippingAddressPostalCode', 'type' => 'text', 'required' => true ], // country [ 'input_name' => 'shippingAddressCountry', // @note: country ID, hence integer! 'type' => 'integer', 'required' => true ], // region/state/province [ 'input_name' => 'shippingAddressRegion', 'type' => 'text' ], // ------------------------ // SPECIAL (NON-ALIASED) // PAYMENT TYPE/CLASS // @todo: @note: name might change! [ 'input_name' => 'padloper_order_payment_id', 'type' => 'integer', 'required' => true ], ]; 2 Link to comment Share on other sites More sharing options...
alexm Posted June 28 Author Share Posted June 28 @Spinbox Ah, good spot. Yes, I'll try this then! I'm just on the move at the mo! Thank you 🙂 Link to comment Share on other sites More sharing options...
kongondo Posted June 28 Share Posted June 28 55 minutes ago, Spinbox said: seems like the padloper input names have changed. They are now camelcase. Yes indeed. 1 hour ago, alexm said: I've attached screenshots to see if you have any clue. Did you forget to attach the screenshots? 🙂. Issue is most like what @Spinbox mentioned. Hope it resolves your issue. 1 hour ago, alexm said: so I must be missing something, but I'm unsure what exactly. I'll think about returning a meaningful error. 1 Link to comment Share on other sites More sharing options...
alexm Posted June 28 Author Share Posted June 28 32 minutes ago, kongondo said: Did you forget to attach the screenshots? 🙂. Yes I did 😂 Classic! Cheers both! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now