Andy Brett
|
d86148420a
|
improve shipping_method_id handling
|
2021-08-24 12:29:48 -07:00 |
|
Andy Brett
|
7dd2c09641
|
ensure terms are accepted before order is placed
|
2021-08-24 12:29:23 -07:00 |
|
Andy Brett
|
3414d9f057
|
clear errors on ship address as well
|
2021-08-24 12:15:20 -07:00 |
|
Andy Brett
|
71076d36a1
|
favor dig to protect against nils
|
2021-08-24 11:54:02 -07:00 |
|
Andy Brett
|
874e1d7f02
|
only advance order to payment if no payment exists
|
2021-08-24 11:23:08 -07:00 |
|
Andy Brett
|
417770e716
|
guard against nil when populating ship address
|
2021-08-24 11:22:20 -07:00 |
|
Andy Brett
|
ea695105b5
|
populate ship address with bill address if no ship address
|
2021-08-24 10:57:36 -07:00 |
|
Jean-Baptiste Bellet
|
9fd126ca0f
|
The ship address is filled from bill address for some attributes
firstname, lastname and phone are the same between those two address. Fill it automatically.
|
2021-08-23 15:42:29 +02:00 |
|
Jean-Baptiste Bellet
|
1ecfeca88c
|
Populate view with both shipping_method_id & ship_address_same_as_billing
... and then handle correctly the display of the form
|
2021-08-23 15:23:53 +02:00 |
|
Jean-Baptiste Bellet
|
fe65359d71
|
Display no shipping method selected error
|
2021-08-23 10:16:53 +02:00 |
|
Andy Brett
|
3bee30ac60
|
clear error messages on order and bill address on first load
|
2021-08-20 09:18:08 -07:00 |
|
Jean-Baptiste Bellet
|
26c5361b0a
|
set shipping method only if param is present
|
2021-08-20 09:18:08 -07:00 |
|
Andy Brett
|
138b7824ba
|
remove ship address if shipping method does not require it
|
2021-08-19 10:18:11 -07:00 |
|
Andy Brett
|
dd00c30503
|
fill ship address with bill address if checkbox is checked
|
2021-08-19 10:17:51 -07:00 |
|
Andy Brett
|
c07046e2f6
|
return an error if no shipping method is selected
|
2021-08-19 10:16:46 -07:00 |
|
Matt-Yorkley
|
fb6ee65865
|
Remove more (currently) unused code
|
2021-08-12 17:24:20 +01:00 |
|
Matt-Yorkley
|
1d074c2151
|
Extract callbacks to a concern
|
2021-08-12 13:06:50 +01:00 |
|
Matt-Yorkley
|
1147c5b2ca
|
Update saved address loading
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
026e51081c
|
Clear invalid payments
When going back and changing the payment option, the previous payment gets invalidated.
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
41c62b97d5
|
Use flash.now unless redirecting
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
dbefd95b5e
|
Improve order workflow shipping method selection
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
5d9c4315d8
|
Remove dead code
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
99f0672f9d
|
Set order amount when creating payment object
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
598e81ed32
|
Progress order to address at start of checkout
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
7e8daea233
|
Reduce data loading on steps
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
4916f823aa
|
Handle order confirmation
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
41ffffe170
|
Tidy up use of @checkout_step
|
2021-08-12 12:53:45 +01:00 |
|
Matt-Yorkley
|
070cb1abc1
|
Improve checkout flow logic
|
2021-08-11 15:54:21 +01:00 |
|
Matt-Yorkley
|
a631d057f1
|
Update payment methods form
|
2021-08-11 15:22:28 +01:00 |
|
Jean-Baptiste Bellet
|
b66b1fcdae
|
Add step 3
|
2021-08-11 15:22:26 +01:00 |
|
Matt-Yorkley
|
6f2035febe
|
Update (provisional) checkout actions boilerplate
|
2021-08-03 11:24:13 +02:00 |
|
Matt-Yorkley
|
2207aae679
|
Add strong params for checkout
We'll need to add more as we go
|
2021-08-03 11:24:08 +02:00 |
|
Matt-Yorkley
|
a32ca23ca5
|
Simplify routes and partials
|
2021-08-03 11:24:03 +02:00 |
|
Andy Brett
|
3d77ba49ac
|
pseudocode flow for steps
|
2021-07-26 15:47:36 +02:00 |
|
Andy Brett
|
939169c504
|
remove unused advance_to_state param
|
2021-07-26 15:47:36 +02:00 |
|
Jean-Baptiste Bellet
|
91c4beea0f
|
No need to add flash error for error
as we render error on each input with error
|
2021-07-26 15:47:36 +02:00 |
|
Jean-Baptiste Bellet
|
151a6fd16b
|
Add first stimulus controllers to display elements
1. Introduce a stimulus toggle_controller
- controller: { "data-controller": "toggle" }
- action: { "data-action": "toggle#toggle" }
- show or not: { "data-toggle-show": true || false }
- targets: { "data-toggle-target": "content", style: "display: none" }
Display payment method price
2. States are populated via a new dependant_select_controller by stimulus.
Usage:
- controller : { "data-controller": "dependant-select", "data-dependant-select-options-value": [ [1: ["option", "for", "1"], [2: ["option", "for", "2"] ] }
- target (on the populating target): { "data-dependant-select-target": "select" }
- source and action (on the input that leads the dependant select): {"data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange"}
Some improvements on readability
3. Populate ShippingMethod description thanks to "shippingmethod_controller"
+
- Add countries and states
|
2021-07-26 15:47:36 +02:00 |
|
Jean-Baptiste Bellet
|
200ced62fb
|
Load shipping methods in the Controller
needed to populate the form
|
2021-07-26 15:47:36 +02:00 |
|
Andy Brett
|
6866cecdfa
|
start with a straight copy of CheckoutController - WIP!
|
2021-07-26 15:47:36 +02:00 |
|
Andy Brett
|
0ea968a900
|
add redirection to correct step
|
2021-07-26 15:47:36 +02:00 |
|
Jean-Baptiste Bellet
|
87a0a5846d
|
WIP; only advance order to delivery state
Use the hidden_field_tag rails helper and move it
|
2021-07-26 15:47:36 +02:00 |
|
Andy Brett
|
af79969d96
|
add SplitCheckoutController and conditional route
|
2021-07-26 15:47:36 +02:00 |
|