Commit Graph

1536 Commits

Author SHA1 Message Date
Pau Perez
eb64569c9a Destroy all shipments when clearing order
Now we only clear the order's shipping_method, and in Spree 2.0 it can
have many shipments.
2018-09-24 15:25:33 +01:00
Pau Pérez Fabregat
99ba9d7d1b Merge branch '2-0-stable' into unit-test-variant-stock 2018-09-19 15:41:21 +02:00
Pau Perez
0491a96d44 Ask to use backorderable? instead of on_demand 2018-09-19 15:12:38 +02:00
Pau Perez
314ad5400f Move variant_stock.rb to concerns/ 2018-09-18 12:18:50 +02:00
luisramos0
d685b706ad In order_decorator.update_shipping_fees! and order_decorator.update_payment_fees!, only update adjustment if it exists 2018-09-14 17:13:20 +01:00
luisramos0
6b3fd22db8 Adapted order_decorator to spree 2 by fixing adjustment.update! call on update_adjustment 2018-09-14 16:40:59 +01:00
Pau Pérez Fabregat
e58f7269c3 Merge pull request #2652 from luisramos0/2-0-within-zone
[Spree 2 Upgrade] Removed unused shipping_method.within_zone, customization not needed
2018-09-11 08:43:06 +02:00
luisramos0
3577f3790d Moved order.shipping_method to the OrderShippingMethod concern 2018-09-11 00:24:35 +01:00
luisramos0
f24b20d28c Added adapted implementation of order.shipping_method to order_decorator 2018-09-10 14:32:50 +01:00
luisramos0
d2f4f8ccb2 Removed unused shipping_method.within_zone, customization not needed 2018-09-06 20:29:04 +01:00
luisramos0
89d51d75ae Merge branch 'master' into 2-0-stable-sept 2018-09-04 17:43:20 +01:00
luisramos0
1b4e0cd73a Made the menu config default values more user friendly 2018-08-31 11:23:11 +10:00
luisramos0
e573a3fc2b The main menu is now translatable and configurable using Content configuration and translations. Added 7 menu entries to the translations file (each with text and url) and 7 content configuration points to enable/disable these. The mobile menu icons can also be configured. 2018-08-31 11:23:11 +10:00
Maikel Linke
c7648d67bd Add Variant stock API of Spree 1 2018-08-30 13:55:12 +10:00
Maikel
8eee8f96ed Merge pull request #2557 from Matt-Yorkley/pi/class_descriptions
Class descriptions for Product Import
2018-08-24 18:14:12 +10:00
Matt-Yorkley
717f626dfe Refactor enterprise validation 2018-08-24 15:51:37 +10:00
Matt-Yorkley
2b057a26d5 Add primary_producer to index to reduce queries 2018-08-24 15:51:37 +10:00
Matt-Yorkley
666fbf53bf Validate enterprise.is_primary_producer? 2018-08-24 15:51:37 +10:00
Maikel
a37931afda Merge pull request #2542 from luisramos0/add_to_cart
Extract OrderController.populate to new CartController and OrderPopulator to new CartService
2018-08-24 14:43:33 +10:00
Maikel
bf55190136 Merge pull request #2546 from Matt-Yorkley/pi/sku_validation
Remove empty SKU values if empty
2018-08-24 14:32:00 +10:00
luisramos0
05bfc098ff /controllers/spree/order_populator_decorator (with a class_eval) is now /services/CartService with no dependency to Spree::OrderPopulator. 2018-08-23 12:39:55 +01:00
luisramos0
a97138dd58 Fixed bulk_line_items_controller_spec by setting shipment on test line_items and by allowing shipment decorator to allow no adjustments in the shipment 2018-08-22 23:20:30 +01:00
Maikel
4417a8f156 Merge pull request #2539 from luisramos0/delete_dead_cart
removed Cart route, controller, model and specs: dead code
2018-08-22 17:35:58 +10:00
luisramos0
898e41acfb Removed monkeypatchs to scope variants on inventory_unit and line_item decorators. We need to make the scoping somewhere else in spree2, see #2559 2018-08-19 20:23:31 +01:00
Matt-Yorkley
fbbbc93aba Class descriptions for Product Import 2018-08-18 11:42:02 +01:00
Matt-Yorkley
28b1fc076a Remove empty SKU values if empty 2018-08-16 14:29:50 +01:00
luisramos0
91e57cb893 Removed Cart table, its dependency on spree orders table and removed some more dead code related to this 2018-08-15 23:29:28 +01:00
luisramos0
4b64369ddb Added GA and Matomo toggle in Legal Settings in the global settings in the BO and added GA and Matomo cookies details to the cookies policy page (according to what is configured in the BO) 2018-08-14 10:01:48 +10:00
luisramos0
ca35c59e52 Moved the footer TOS URL from the content settings to the new section legal settings in the global settings 2018-08-14 10:01:48 +10:00
luisramos0
d920c32376 Added cookies banner toggle and privacy URL to a new section called Legal Settings in the global settings in the BO 2018-08-14 10:01:48 +10:00
luisramos0
0b9061df28 removed Cart route, controller, model and specs: dead code 2018-08-11 22:17:12 +01:00
luisramos0
3b1bd53d3a Added basic integration with Matomo
Added matomo script and added a new matomo settings menu entry under configuration. Improved organization of en.yml by grouping configuration screens.
2018-08-10 16:12:58 +10:00
Maikel Linke
27ddb712c1 Remove unused scope Spree::Variant.in_stock
Our added scope is not used anywhere and conflicts with the Spree
upgrade.

https://github.com/openfoodfoundation/openfoodnetwork/issues/2014
2018-08-09 14:22:43 +10:00
Matt-Yorkley
c8397024e4 Streamline Product Import UX flow 2018-08-03 14:33:35 +10:00
Pau Perez
43bf7293bf Merge branch 'master' into 2-0-stable
* master: (125 commits)
  Fix syntax error in GETTING_STARTED.md
  Fix syntax error in README.md
  Fix link syntax errors in REAME.md and GETTING_STARTED.md
  Style recently merged code
  Update gem i18n-js to pick up locale changes
  Fix embedded shopfront menu responsiveness
  Add communications links to README
  Fix script/setup by making it less clever
  Change import and reset logic to work with first page
  Move options to first page
  Fix wrong sort predicates in customer index
  Reset reverse when clicking another column to sort
  Move logic for toggling by column into SortOptions
  Generalize sorting through SortOptions service
  Remove unused sorting preferences in ColumnsCtrl
  Fix frontend sorting in "Bulk Order Management"
  Fix frontend sorting in "Customers" index
  Change sorting to be done in ascending order first
  Wrap rows in customer index with TBODY tag
  Update .rubocop_todo.yml
  ...
2018-07-27 10:21:47 +02:00
Maikel
238a07dbd6 Merge pull request #2488 from HugsDaniel/2434-remove-dash-dependency
[Spree Upgrade] Remove dependency to Dash and Jirafe
2018-07-27 13:00:15 +10:00
Pau Perez
eaf108718c Add doc to method 2018-07-25 13:52:05 +02:00
Pau Perez
d1e65691cf Copy distributor addr. when using a pick up method
This copies the distributor's address when at least one of the order shipments
uses a shipping method that requires shipping address.
2018-07-25 11:07:16 +02:00
Pau Perez
f1896313b3 Move shipping_address_from_distributor to OrderUpdater
This is still Spree-1.3 compatible not considering multiple shipments
and shipping methods.
2018-07-25 11:07:16 +02:00
Pau Perez
21d905a092 Refactor OrderUpdater to decorate Spree's one
This replaces the nasty class eval and provides some encapsulation
2018-07-25 11:07:16 +02:00
Hugo Daniel
ec751c0a78 Remove admin analytics ability 2018-07-24 15:27:22 +02:00
Matt-Yorkley
67767f86eb Change import and reset logic to work with first page 2018-07-23 02:07:00 +01:00
Matt-Yorkley
bd200c885b Move options to first page 2018-07-23 01:46:32 +01:00
Pau Pérez Fabregat
7bf27ec6b3 Merge pull request #2409 from mkllnk/2013-remove-scope-active_distributors
2013 Remove dead code for Spree upgrade
2018-07-18 10:38:19 +02:00
Maikel Linke
2334f0854c Less invasive modifying the checkout state machine 2018-07-11 10:55:12 +10:00
Rob Harrington
4863f2b5b4 Remove unrequired credit_card_id field from subscriptions table 2018-07-05 19:26:12 +10:00
Rob Harrington
21c3f7d21c Remove unrequired #cards and #addresses actions from Admin::CustomerController 2018-07-05 19:26:12 +10:00
Rob Harrington
cf8ca1f8c1 Add show action to Admin::CustomersController 2018-07-05 19:26:11 +10:00
Rob Harrington
fc2844a3d5 Add default_card method to user model 2018-07-05 19:26:11 +10:00
Maikel Linke
c7f7e420ea Skip shipment creation for payment step
https://github.com/openfoodfoundation/openfoodnetwork/issues/2007

Spree 2.0.4 creates in-memory shipments for the payment step. That means
we don't need to create a shipment in that transition. This change
copies the checkout_flow from the Spree code, but leaves one last
customisation: removal of the confirm step.
75ec77dc31
2018-07-05 16:34:11 +10:00