Luis Ramos
cf7d8067df
Fix easy rubocop issues
2020-11-04 12:15:23 +00:00
Pau Pérez Fabregat
4911bb6613
Merge pull request #6274 from luisramos0/rubocop
...
Use rubocop auto correct to fix a number of issues
2020-11-02 22:13:36 +01:00
Luis Ramos
eea73aa989
Merge pull request #5919 from luisramos0/injector_refactor_for_rails41
...
[Rails 4.1, works in master] Convert relations with to_a so that they work in rails 4.1
2020-10-31 09:33:27 +00:00
Luis Ramos
ca1373a366
Fix Style/RescueStandardError and Style/RegexpLiteral
2020-10-30 16:50:37 +00:00
Luis Ramos
85096a997f
Add a checkbox to checkout to tick for Terms and Conditions
...
Checkout button should be disabled if checkbox is not ticked
2020-10-30 15:08:26 +00:00
Luis Ramos
586e8a9abe
Fix some more rubocop issues
2020-10-30 10:13:16 +00:00
Luis Ramos
399fe2c01b
Make code work for relations and arrays
2020-10-30 10:12:56 +00:00
Luis Ramos
3aeb87debc
Make it work with both relations and arrays
2020-10-30 10:12:56 +00:00
Luis Ramos
440e69e156
Convert relation to array to be able to use sum
2020-10-30 10:12:47 +00:00
Luis Ramos
7e606471e4
Make tag_rulee_applicator and available_payment_methods_filter handle case where a relation is given instead of an array
2020-10-30 10:10:54 +00:00
Luis Ramos
e4f3aae7c0
Add customer balance to customer list
2020-10-29 13:38:36 +00:00
Luis Ramos
032075c04a
Merge pull request #6119 from arku/chore/fire-event-removal
...
Remove fire_event method usage
2020-10-21 21:21:35 +01:00
Matt-Yorkley
f5ce0d501d
Merge pull request #5870 from luisramos0/prefs
...
[Bye bye Spree] Bring models app_configuration and preference from spree_core
2020-10-20 21:12:54 +02:00
Luis Ramos
b267f542d1
Merge pull request #5980 from luisramos0/spree_clean_up
...
[Bye bye spree] Some clean up fixes to make it all work without spree
2020-10-20 18:52:54 +01:00
Arun Kumar Mohan
b0fa1464f8
Remove fire_event method usage
2020-10-18 20:36:38 -05:00
Luis Ramos
1b4e19b32d
Remore preferences not used in OFN
2020-09-23 22:16:56 +01:00
Matt-Yorkley
77eaebc2a7
Merge pull request #5888 from andrewpbrett/imperial-auto-units
...
Allow US units on products/variants
2020-09-17 15:04:15 +02:00
Luis Ramos
739917ca46
Add require for spree responder
2020-09-17 13:58:45 +01:00
Luis Ramos
b6a374ab66
Remove spree require that is not needed in OFN
2020-09-17 13:58:10 +01:00
Luis Ramos
a5dd1526f7
Delete dead code ProductFilters
2020-09-17 13:58:10 +01:00
Pau Pérez Fabregat
27ffe9edb2
Merge pull request #5971 from luisramos0/testing
...
Remove some old spree test helpers that are not needed
2020-09-15 09:13:20 +02:00
Pau Pérez Fabregat
7df2759475
Merge pull request #5907 from Matt-Yorkley/data-cleanup
...
Data cleanup
2020-09-10 17:06:20 +02:00
Pau Perez
e3c1159c17
Start with 6 months data retention
...
As discussed in code review.
2020-09-08 12:49:58 +02:00
Pau Perez
14054f0e70
Move retention period to constant
...
There's no need to reevaluate the date 3 times, potentially leading to
edge cases.
2020-09-08 12:48:30 +02:00
Pau Perez
d525ddfe14
Move missing statements to where + delete_all
...
And fix the specs
2020-09-08 12:47:42 +02:00
Pau Pérez Fabregat
df0b997258
Use where + delete_all to increase readability
...
Co-authored-by: Maikel <maikel@email.org.au >
2020-09-08 12:26:47 +02:00
Pau Pérez Fabregat
ffbb0d26a4
Unhardcode class name
2020-09-08 12:26:21 +02:00
Luis Ramos
e413920335
Move both OptionValueNamer and VariantAndLineItemNaming to app/services/variant_units
2020-09-03 09:11:00 -07:00
Luis Ramos
83ae13d7c7
Extract method to make code easier to read
2020-09-03 09:11:00 -07:00
Luis Ramos
9204687e4d
Fix rubocop issues
2020-09-03 09:11:00 -07:00
Luis Ramos
c6741dda36
Fix rubocop complexity issues by making code easier to read
2020-09-03 09:11:00 -07:00
Andy Brett
55e448897f
use fewer sigfigs for ounces; add spec to option_value_namer
2020-09-03 09:11:00 -07:00
Andy Brett
2fe9f4abc8
style updates for rubocop
2020-09-03 09:11:00 -07:00
Andy Brett
9b9b6ded09
add each scales system in option_value_namer.rb
2020-09-03 09:11:00 -07:00
Andy Brett
e99799bca2
add ounces and round up for lbs
2020-09-03 09:11:00 -07:00
Zee Spencer
f5e300a5de
Presenting a line item or variants options_text uses overriden values
...
This changes how we display the description of weight, but it doesn't
change the `Spree::OptionValue`s that are being created when someone
adds a product to their cart.
This takes us closer by making the UI look more correct; but it feels
odd compared to settiong the `Spree::OptionValue` to the correct
unit on creation.
But on the other hand, that could possibly make things worse for the
shipping calculation bits.
2020-09-03 09:10:59 -07:00
Zee Spencer
ae0b76e610
Support imperial units when scaling the unit value
...
We are pretty sure this is not the correct final implementation, but
we wanted to get some tests failing so we can start to fix them.
2020-09-03 09:10:59 -07:00
Zee Spencer
cb09c935dc
WIP: Products may be created with pounds for their weight unit_converter
...
See: https://community.openfoodnetwork.org/t/hubs-managers-can-choose-the-adapted-weight-and-measure-units-for-their-shops-given-their-own-local-situation/1289/11
We're not entirely sure what needs to be changed in order for this to
accurately work with shipping and other parts of the eCommerce platform.
We are assuming that so long as we canonically store the weight scale
in grams, that the shipping calculation will be able to do what it needs
to. So if we put in values for "oz" as grams, we may not need to do
much else in order to let product(s) be sold by the pound (or ounce).
Next steps appear to be:
- [ ] When looking at an order as a customer, do we want to show pounds
instead of grams? (See: http://localhost:3000/orders/R125684626 )
- [ ] Compile a list of tests that are worth writing (because we have
no confidence that we know what we are supposed to be doing in
order for this feature to be "ready" to be used by people.)
- [ ] Write a test that demonstrates when we create a product with a
variant in pound that the product's shipping weight is correctly
calculated?
- [ ] Do we want to think about i18n?
2020-09-03 09:10:59 -07:00
Luis Ramos
cfdfd82d9a
Replace api controller test helpers with easier existing alternatives
2020-08-31 17:05:51 +01:00
Luis Ramos
b872bf49c5
Replace usage of helper method with a more simple approach
2020-08-31 16:56:48 +01:00
Luis Ramos
3df5a0644f
Make sample data vegetarian
2020-08-31 10:57:07 +01:00
Matt-Yorkley
28651bbecf
Merge pull request #5941 from luisramos0/no_spree_specs
...
[Bye bye Spree] Make OFN independent of spec helpers under core/lib/testing_support
2020-08-27 17:05:45 +02:00
Pau Pérez Fabregat
2fa8cd54fd
Merge pull request #5769 from Matt-Yorkley/customer-names
...
Customer names in reports
2020-08-27 15:39:47 +02:00
Luis Ramos
5cd40cb19f
Remove dependency to Spree::TestingSupport code
2020-08-22 18:14:53 +01:00
Luis Ramos
d1b60e3778
Merge pull request #5905 from mkllnk/lost-decorators
...
Load previously lost decorator code and don't delete orders
2020-08-21 12:34:37 +01:00
Luis Ramos
40d4ed2c95
Merge pull request #5733 from luisramos0/base_ctrl
...
Move lib/spree to OFN
2020-08-19 18:35:17 +01:00
Luis Ramos
72f5b1b251
Revert "Remove unreachable order recovery code"
...
This reverts commit 355c5f5c55 .
This code is necessary to preserver cart contents across logins on
different browser sessions.
2020-08-19 17:36:36 +01:00
Maikel Linke
355c5f5c55
Remove unreachable order recovery code
...
Every page load creates a cart order if none is present. So when a user
logs in, they always have an order stored in their session. And
therefore, we never got to recover an old order.
We could have fixed the code to restore old orders. But as far as I can
tell, order recovery hasn't been working for years and I couldn't find
any issue requesting this feature.
If we wanted to implement order recovery, it should probably be designed
more carefully and included in the `current_order` method.
2020-08-19 12:06:58 +10:00
Matt-Yorkley
91501f05f2
DRY date usage
2020-08-15 11:19:24 +01:00
Matt-Yorkley
93601ca556
Extract #remove_transient_data from TruncateData
2020-08-15 11:19:24 +01:00