Commit Graph

57 Commits

Author SHA1 Message Date
Andrew Spinks
a8d4efd067 Add new 'shop' route that switches to the selected distributor and empties the cart if it has any line_items for a different distributor. 2013-08-16 17:08:19 +10:00
Andrew Spinks
fdaa5364a1 Add controller action for adding products to multi cart via javascript API. 2013-08-15 15:36:35 +10:00
Andrew Spinks
59fce8a964 Show line items for each order in multi-cart. 2013-08-14 10:49:55 +10:00
Rohan Mitchell
5fac29d2ed Do not merge current and incomplete orders when logging in - fixes #20 2013-08-14 10:44:02 +10:00
Rohan Mitchell
43f482a803 Remove use of deprecated rspec syntax 2013-08-13 09:11:26 +10:00
alexs
295d86affb Removed the test that is believed to be incorrect and failing build. 2013-08-09 14:44:54 +10:00
Andrew Spinks
bc57364c7e Add simple angular cart to the main page. 2013-08-08 18:31:56 +10:00
Andrew Spinks
ac37dff946 Add controller for cart and beginnings of an API. 2013-08-08 18:31:56 +10:00
Andrew Spinks
7bd0582b50 remove pry call 2013-08-08 10:48:05 +10:00
David Cook
c247c2d3ea WIP: Allow distributor enterprise user to access their orders 2013-08-07 09:19:28 +10:00
Andrew Spinks
6c18c5c65f Fix bulk product edit so that it works with products with a blank available_on field. 2013-07-25 13:51:37 +10:00
Andrew Spinks
7cb054f430 Merge branch 'master' into order-cycle-selection
Conflicts:
	Gemfile
	Gemfile.lock
	app/controllers/spree/orders_controller_decorator.rb
	app/models/enterprise.rb
	app/models/spree/order_decorator.rb
	app/views/spree/checkout/_other_available_distributors.html.erb
	app/views/spree/products/_add_to_cart.html.haml
	lib/open_food_web/distributor_change_validator.rb
	spec/spec_helper.rb
2013-07-23 14:42:57 +10:00
Rob H
3c973178fd WIP: remove unneeded representative-based data request infrastructure 2013-07-23 10:43:08 +10:00
Rob H
9863a84a27 WIP: transfer bulk product update data requests to API 2013-07-23 10:43:08 +10:00
Rob H
97c03b50cc Create new api routes/views/controllers for bulk product edit 2013-07-23 10:43:08 +10:00
Rob H
2384c4a43e Remove naughty pry 2013-07-23 10:37:51 +10:00
Rob H
5d30df5717 BPUR: add supplier name to product model to allow searching 2013-07-23 10:37:50 +10:00
Rob H
1bd4875a6f BPUR: Can clone products 2013-07-23 10:37:50 +10:00
Rob H
5db0d839fa BPUR: can delete products 2013-07-23 10:37:50 +10:00
Rob H
c80cba7fa5 BPUR: Don't use master variant to update attributes. Changes to product filtering. 2013-07-23 10:37:50 +10:00
Rob H
0ca0abd0b2 Can alter on_hand and price of individual variants 2013-07-23 10:37:50 +10:00
Rob H
f3d778af1a BPUR: can update master on_hand 2013-07-23 10:37:50 +10:00
Rob H
fbb3657bdc BPUR: can update master price. Test refactor and added angular ng-decimal directive 2013-07-23 10:37:50 +10:00
Rob H
44ad7584f0 BPUR: can update available_on 2013-07-23 10:37:50 +10:00
Rohan Mitchell
bc40b2c856 Test each distinct distributor/order cycle invalid combination case 2013-06-21 11:06:21 +10:00
Rohan Mitchell
3386da4b4c Validate distribution combination for new products added to cart 2013-06-21 10:39:08 +10:00
Rohan Mitchell
065ea6a1a1 Remove controller specs that are now covered by OrderPopulator 2013-06-14 14:57:31 +10:00
Rohan Mitchell
02b524bfce Fix our monkey-patch of spree's order merging to accomodate orders having an order cycle 2013-04-05 15:00:42 +11:00
Rohan Mitchell
a5c706d694 In test, create a global shipping method, which is required when creating orders 2013-03-08 15:18:52 +11:00
Rob H
c956706d78 Move set_current_order override to new location in lib (Spree 1.3 Upgrade), and update home controller test 2013-02-14 15:12:50 +11:00
Rob H
b924b0c817 Remove unnecessary include of Spree::Core::CurrentOrder (helper is now accessible by all controllers in Spree 1.3) 2013-02-14 12:24:01 +11:00
Rob H
6a45e8be3b Make tests pass after changes to checkout broke them all 2013-01-18 15:29:36 +11:00
Rohan Mitchell
34588e6141 Remove old supplier and distributor routes, models, controllers, views, specs 2012-11-01 09:55:45 +11:00
Rohan Mitchell
58d227e76a Home controller and product model specs pass 2012-11-01 08:28:40 +11:00
Rohan Mitchell
9d5c127f0d Add enterprises controller that supercedes suppliers and distributors controllers. Add to cart consumer spec passes. 2012-10-31 16:47:01 +11:00
Rohan Mitchell
a8f4178894 Update orders controller for enterprises 2012-10-31 16:33:38 +11:00
Rohan Mitchell
15e91f7743 WIP Move non-admin non-Spree controllers out of Spree namespace 2012-10-25 10:45:39 +11:00
Rohan Mitchell
2535e3965b When merging orders, set distributor when target order distributor is nil 2012-10-09 08:42:29 +11:00
Rohan Mitchell
568d948cbe Destroy incomplete orders if they can't be merged, prevents that order unexpectedly appearing in cart after checkout. Also ensure all orders have a shipping method. 2012-10-05 12:09:53 +10:00
Rohan Mitchell
27b7d59f46 BaseController does not attempt to merge incomplete and current orders when they have differing distributors 2012-10-02 09:44:51 +10:00
Rohan Mitchell
a1b5102476 Fix checkout totals, also amend factories for valid test shipping method data 2012-09-21 12:35:01 +10:00
Rohan Mitchell
3794c00856 Upgrade Rails to 3.2.8 and Spree to 1.1.3 2012-09-14 10:20:52 +10:00
Rohan Mitchell
2db2fbcade Change set_variant_attribute to set_variant_attributes, implement it on Order 2012-08-02 14:45:27 +10:00
Rohan Mitchell
ea05f05576 When adding a group buy product to the cart, set the max quantity on the order 2012-08-02 14:29:05 +10:00
Rohan Mitchell
5e04032797 Explicitly specify Spree 1.1.1, fix test regression in OrdersController 2012-07-23 18:48:30 +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
7b92fcb614 Do not allow deselecting distributor after product added to cart at controller level 2012-06-24 14:56:27 +10:00