Commit Graph

1970 Commits

Author SHA1 Message Date
Rohan Mitchell
c09d4c98c8 Product distributions now editable 2012-06-28 15:38:26 +10:00
Rohan Mitchell
474c049f0d Set up basic form for admin editing product distributions (not yet functional) 2012-06-28 15:13:26 +10:00
Rohan Mitchell
1d3b7de5c6 Require ProductDistribution to be unique on [product, distributor] 2012-06-28 15:12:15 +10:00
Rohan Mitchell
3f08c2a9b0 Convert distributors_products join table into ProductDistribution explicit join model 2012-06-27 11:55:10 +10:00
Rohan Mitchell
5930363fa2 Validate presence of address on supplier and distributor v0.0.3 2012-06-27 09:25:14 +10:00
Rohan Mitchell
5f9b823b9c Add basic payment information to db:seed - more work needed to make valid for checkout 2012-06-27 09:21:01 +10:00
Rohan Mitchell
d859999bdc Checkout spec passes 2012-06-27 09:11:40 +10:00
Rohan Mitchell
c5270d6fa1 Set shipping address from distributor, fix zone init in checkout spec 2012-06-27 09:06:18 +10:00
Rohan Mitchell
340259eb2a Fix database cleaner strategy: http://blog.55minutes.com/2012/05/faster-capybara-specs/ 2012-06-26 16:19:54 +10:00
Rohan Mitchell
09f5bb8eed Switch database cleaner strategy back to transaction after js test has run 2012-06-26 16:05:21 +10:00
Rohan Mitchell
e0e566e625 Display distributor information on checkout address page 2012-06-26 16:04:59 +10:00
Rohan Mitchell
4b9c0f01e2 Update admin backend for supplier/distributor address extraction 2012-06-26 14:54:35 +10:00
Rohan Mitchell
ba3c02346d Extract distributor and supplier address to spree address model 2012-06-26 14:52:55 +10:00
Rohan Mitchell
f75b9bb176 Swap order of continue shopping and empty cart buttons 2012-06-26 10:58:09 +10:00
Rohan Mitchell
cb6ac2064d Rearrange buttons on cart checkout form 2012-06-26 10:50:50 +10:00
Rohan Mitchell
3ad575cb5f Display variant price differences as absolute, not relative values 2012-06-26 09:54:00 +10:00
Rohan Mitchell
34b694666c Grey out inactive distributors 2012-06-26 08:24:32 +10:00
Rohan Mitchell
0662e8f676 Show links to distributor home page, particularly when viewing product not available at current distributor 2012-06-26 08:12:35 +10:00
Rohan Mitchell
f3d52825ae Remove redirect_back_or_default, which was causing unexpected behaviour 2012-06-26 07:54:55 +10:00
Rohan Mitchell
9258d47e55 When adding subsequent products, add valid products to cart 2012-06-26 07:52:45 +10:00
Rohan Mitchell
a48a100bcc Merge branch 'shop-by-distributor' v0.0.2 2012-06-25 09:10:50 +10:00
Rohan Mitchell
32dca81467 Update spec for markup change 2012-06-25 09:10:34 +10:00
Rohan Mitchell
6cd9bff29f Convert most templates from erb to haml 2012-06-25 09:06:56 +10:00
Rohan Mitchell
a7df5a2f1e Include jquery, add basic styling for add to cart form, split supplier and distributors in product details sidebar 2012-06-25 08:57:53 +10:00
Rohan Mitchell
f4108921ed When adding subsequent product to cart, do not allow the user to add a product from another distributor 2012-06-25 08:45:08 +10:00
Rohan Mitchell
178f581452 When an item has been added to the cart, do not allow the user to select a distributor when adding a subsequent item 2012-06-25 07:25:31 +10:00
Rohan Mitchell
98bcc9ce71 When adding first product to cart, add the product and set the distributor even if the order has a different distributor set 2012-06-25 06:57:24 +10:00
Rohan Mitchell
df831a9128 Do not add the product to cart if the chosen distributor is different from the order's distributor 2012-06-24 20:14:07 +10:00
Rohan Mitchell
4481ca83f9 OrdersController does not permit adding products with invalid distributors 2012-06-24 19:58:09 +10:00
Rohan Mitchell
24ad4f53fc Raise error if distributor changed illegally 2012-06-24 19:23:44 +10:00
Rohan Mitchell
a41c5d4735 Move distributor permissions onto order class, do not show links to change distributor if the action is invalid 2012-06-24 15:15:53 +10:00
Rohan Mitchell
7b92fcb614 Do not allow deselecting distributor after product added to cart at controller level 2012-06-24 14:56:27 +10:00
Rohan Mitchell
d3c80e99fc Do not allow changing distributor after product added to cart at controller level 2012-06-24 14:54:48 +10:00
Rohan Mitchell
056733a426 Add controller spec for deselecting distributors 2012-06-24 13:48:55 +10:00
Rohan Mitchell
3219006423 Push several request specs down to controller level, replace with scenario. Set order's distributor when adding product to cart 2012-06-24 13:21:36 +10:00
Rohan Mitchell
fc5795173e Do not add the product to cart if the user specifies a distributor that the product is not available at 2012-06-24 12:56:47 +10:00
Rohan Mitchell
99d6f0baa9 Require a distributor when adding a product to the cart 2012-06-24 12:13:33 +10:00
Rohan Mitchell
b5082009ce Add pending specs for adding products to cart with distributor 2012-06-24 12:13:13 +10:00
Andrew Spinks
4faed954e6 use database truncation for javascript request tests. 2012-06-24 11:41:19 +10:00
Rohan Mitchell
b2f5e23fa4 Test selecting distributor when adding item to cart, for no/remote distributor selected 2012-06-24 11:41:10 +10:00
Rohan Mitchell
a91722a593 Display distributor choice on add to cart form 2012-06-24 11:28:06 +10:00
Rohan Mitchell
9be5dc41b9 Split products by local/remote distributor: style 2012-06-24 09:41:33 +10:00
Rohan Mitchell
34f95ffb4a Split products by local/remote distributor: apply to products, search results and taxon pages 2012-06-24 09:21:44 +10:00
Rohan Mitchell
ebb624bdc3 Reload application files, routes and factories each spork run 2012-06-24 09:10:25 +10:00
Rohan Mitchell
32050bbba4 Split products by local/remote distributor: views and basic style 2012-06-24 07:37:25 +10:00
Rohan Mitchell
5411685c83 Split products by local/remote distributor: logic 2012-06-24 07:36:56 +10:00
Rohan Mitchell
5e6c4de34b Leave a distributor 2012-06-23 12:33:38 +10:00
Rohan Mitchell
2cdf32590c Fix indentation of markdown code blocks 2012-06-22 15:46:13 +10:00
Rohan Mitchell
d0422d20b0 Update setup instructions 2012-06-22 15:41:49 +10:00
Rohan Mitchell
9acdce06c3 Replace stock Rails README file with project-specific info 2012-06-22 15:31:24 +10:00