Commit Graph

57 Commits

Author SHA1 Message Date
Mohamed ABDELLANI
bd0e7cdfc8 remove legacy checkout tests 2023-06-13 14:58:16 +01:00
Jean-Baptiste Bellet
236e77efd4 Fix various import: CurrentUser 2023-02-09 16:50:40 +01:00
Jean-Baptiste Bellet
a486a08bfc Fix various import issues: currentHub 2023-02-09 16:50:40 +01:00
Jean-Baptiste Bellet
af69064d3a Add mocked shopfront 2022-04-15 10:53:28 +10:00
Matt-Yorkley
dc6be6f06b Don't resubmit the whole cart contents for no reason.
There's a couple of places where this was causing a cart update submission where it wasn't needed, eg the items had not actually changed. The conditional here was designed to stop that from happening, but it was actually passing every time (the conditional logic was not actually catching the case it was supposed to).

This is really expensive!
2021-06-04 17:10:50 +01:00
Maikel Linke
bd731267ec Allow user to get maximum available quantity
When the user entered a number beyond the stock level, the browser was
correcting that to the max number which is very helpful. But Angular was
setting the model to undefined which removes the item from the cart.

Deactivating Angular's max behaviour let's us set the value ourselves
which is then used in the cart.
2021-01-22 16:42:21 +11:00
Maikel Linke
35b4e8c4d1 Allow editing of invalid quantities
If the user entered an invalid quantity, Angular set the model to
undefined and we removed the input field to show the add button. That
makes it impossible for a user to see what the maximum quantity to enter
would be. For example:

- The variant has a stock level of 5.
- The user enters 7.
- Angular sets it to undefined.
- The input field disappears.
- The user is startled and doesn't know how to proceed.

But now we hide the input only if it's deliberately set to zero.
2021-01-22 16:42:21 +11:00
Maikel Linke
0166400b03 Guard against invalid quantity input
The user can now type anything into the quantity field and some of it
may not be valid. These safe guards ensure that the buttons still work
even if the quantity is undefined or out of range.

Angular guards against the value being out of range but that has other
side-effects. We want to be able to de-activate some of Angular's
behaviour.
2021-01-22 16:42:20 +11:00
Maikel Linke
af918e63ee Change bulk quantities on any quantity change
This prepares for changing the quantity with an input field. It also
applies if the quantity is changed after an ajax request.
2021-01-22 16:42:20 +11:00
Maikel Linke
d337561ea8 Move ShopVariantCtrl to own file and spec it 2020-10-22 15:46:46 +11:00
Matt-Yorkley
fe0de98821 Add pagination in Angular and views 2019-10-08 10:11:22 +01:00
Rob Harrington
254f0db97c Automatically select the customer's default card in the checkout 2018-06-08 15:30:07 +10:00
Rob Harrington
5c16fefe41 Creating basic angular StripeJS wrapper service for requesting tokens 2017-09-23 14:57:02 +10:00
Rob Harrington
e57a25d05f Replacing local storage library with actively maintained one: grevory/angular-local-storage 2016-10-21 10:51:36 +11:00
Rob Harrington
b59a1cc232 Using true/false instead of YES/NO for address defaults and billing same as shipping 2016-10-21 10:51:36 +11:00
Bing Xie
3e590f92ff Set default billing address and shipping address 2016-10-21 10:51:36 +11:00
Bing Xie
a6cfa061e4 Fix ship_address_same_as_billing checkbox value with string 2016-10-21 10:51:36 +11:00
Rob Harrington
b957555c82 Adding infinite-scroll to the shopfront
For performance improvement with large data sets
2016-08-10 12:08:03 +10:00
Rob Harrington
7a498362b3 Upgrading AngularJS specs to Jasmine 2 syntax 2016-05-25 08:10:20 +10:00
Rohan Mitchell
faa1d0d1c5 When cart clear is declined, revert order cycle selection change 2015-07-31 16:56:08 +10:00
Rohan Mitchell
e662aab004 Brand story can be expanded and contracted 2015-05-06 14:54:16 +10:00
Rob Harrington
46690faffb Fixing Darkswarm Angular Product Controller spec 2015-04-17 15:14:19 +10:00
Rob Harrington
06f10398da Adding product property filter to shop page 2015-03-06 11:22:52 +11:00
Rob Harrington
4829e59663 Fixing checkout controller spec 2015-01-22 10:46:31 +11:00
Rohan Mitchell
cbb968d87f Pass checkout form to controller method 2014-11-06 18:29:48 +11:00
Rohan Mitchell
75b250d3fe When submitting checkout, if field is invalid, show errors 2014-11-06 18:29:48 +11:00
Rohan Mitchell
b35c5e902f Fix broken JS specs 2014-08-19 16:47:51 +10:00
Rohan Mitchell
16847025dd Fix bug: local storage was not correctly keyed to user id 2014-08-08 11:14:50 +10:00
Rohan Mitchell
1ac5b79aeb Fix failing JS specs 2014-07-30 14:33:36 +10:00
Will Marshall
562f8dbd4e Starting to restructure data injection 2014-07-18 11:21:51 +10:00
Will Marshall
2b1ab53d8e Fixing regressions and refactoring our tests 2014-07-16 16:00:44 +10:00
Will Marshall
1ed634239d Major refactoring 2014-06-20 16:31:49 +10:00
Will Marshall
8905b45333 Fixing a minor regression 2014-06-19 12:10:05 +10:00
Will Marshall
c02c7cf7ca Further patches to the damned RABL system, patching everything up to use our new Service structure 2014-06-18 17:54:13 +10:00
Will Marshall
e7c301da83 Reworking the RABL templates for simplicity AND fixing up all the tests 2014-06-18 13:05:44 +10:00
Will Marshall
69e5459afd Finishing off the merge with localStorage refactoring with sekrets 2014-06-04 17:22:10 +10:00
Will Marshall
a6a4d28072 Fixing up bugs in the Checkout form 2014-06-04 17:13:18 +10:00
Will Marshall
59c433881e Making the auto-closing more granular on checkout 2014-06-04 17:12:16 +10:00
Rohan Mitchell
37c780ed70 WIP: Send credit card details to server on checkout 2014-06-04 16:20:48 +10:00
Will Marshall
1a47a7486e Automatically closing the accordion if the form is already valid 2014-05-30 11:58:22 +10:00
Will Marshall
d1b27edefe Reworking the JS specs 2014-05-22 12:40:46 +10:00
Will Marshall
998fb07330 Splitting out the accordion stuff for checkout 2014-05-08 16:07:56 +10:00
Will Marshall
d5648bd993 Removing some garbage, adding admin link 2014-05-08 11:50:57 +10:00
Will Marshall
28230f0436 Adding a current user service, refactoring various consequences of this change: 2014-04-25 16:59:46 +10:00
Will Marshall
22dc8cbfa0 Unbreaking karma karma lama 2014-04-25 12:04:15 +10:00
Will Marshall
2e0485c064 Getting the entire order into localStorage: one bug with radio boxes 2014-04-11 17:24:32 +10:00
Will Marshall
c8012e7045 Improving panel workflow, moving back to simple format for Order service 2014-04-11 16:43:21 +10:00
Will Marshall
5f62cb7ddb Working with ngForm and subcontrollers. Also fixing bulk order specs 2014-04-10 16:32:08 +10:00
Will Marshall
621e58f67a First stab at a DRY implementation 2014-04-10 12:54:18 +10:00
Will Marshall
b5550c048a Starting on JSON checkout, moving Order properties to Order.order 2014-04-09 14:33:45 +10:00