Jean-Baptiste Bellet
58c8eae08c
Enterprise logo: resize and crop at the center of image instead of just resize
...
Should fit in a square format
2022-11-08 14:54:11 +01:00
Rachel Arnould
2652bc086a
Merge pull request #9755 from cillian/order-cycle-payment-methods
...
Let people choose which payment methods are available to customers on order cycles
2022-10-26 20:10:34 +02:00
Maikel
55ef4dfe0d
Merge pull request #8809 from Matt-Yorkley/dead-code-variants-check
...
Remove dead code: Product#variants?
2022-10-25 10:49:01 +11:00
Rachel Arnould
3c9b7a10f4
Merge pull request #9058 from Matt-Yorkley/oidc-redux
...
Add OIDC authentication for Les Communs
2022-10-24 13:18:36 +02:00
Cillian O'Ruanaidh
f5bd23b4d8
Remove unused Spree::Order#available_payment_methods method
...
This was introduced in 47d2f698ef but we are using OrderAvailablePaymentMethods now.
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
2c14aecf4f
Extract a OrderCycleClone service
...
Before it was giving a Rubocop error, probably not a bad idea anyway.
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
4e6d64c0a1
Let people choose which payment methods are available to customers on order cycles
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
5423c1c02e
Resolve conflict in db/schema.rb
2022-10-21 17:21:24 +01:00
Matt-Yorkley
0ca86344d2
Update use of deprecated #add_tab method to #add_metadata
2022-10-19 17:36:53 +11:00
Matt-Yorkley
c0ee72319f
Remove dead code: Product#variants?
...
This only makes sense in the context of Products which only have "master" variants, and we removed that option a while back.
Remove #variants? check from ProductStock concern
2022-10-19 16:30:12 +11:00
Maikel Linke
f00aeb006e
Allow enterprise users to authorize via OIDC
2022-10-18 11:32:14 +11:00
Matt-Yorkley
617164684c
Configure OIDC
2022-10-18 11:32:14 +11:00
Maikel Linke
46fde6bd40
Remove now unused scope
2022-10-12 16:48:32 +11:00
Ashwini Seshadri
590a09f069
Fixed the permissions relationship, so the shop displays only suppliers and does not display distributors in producers list
...
and updated relevant tests
2022-10-12 16:48:31 +11:00
AthiraKadampatta
80eef9c302
9726 Add attachment_width and attachment_height to the list of ignored columns for spree images
2022-10-10 16:52:02 +02:00
AthiraKadampatta
1f161bee1f
Add paperclip columns to ignored columns list for enterprise, enterprise group, terms_of_service_file, spree/image models
2022-10-10 16:52:02 +02:00
Maikel
5894246474
Merge pull request #9682 from binarygit/picked_up_email
...
Send picked up emails when orders are picked up
2022-10-10 13:15:24 +11:00
Maikel Linke
52e934ec2b
Consistently use our FeatureToggle module
...
Direct calls to Flipper have the downside that we can't add any new
functionality like storing the feature in the database when used.
2022-10-08 16:23:17 +02:00
binarygit
44db511e66
Send a picked up email (rather than shipped email) when orders are picked up by customers
2022-10-08 12:31:26 +02:00
binarygit
25ae10dbe8
Create bulk orders cancellation feature
2022-10-04 16:57:31 +02:00
jibees
0c64720a9e
Merge pull request #9710 from mkllnk/9002-customer-association-updates
...
Associate and update customer records when ordering
2022-09-30 16:36:01 +02:00
Cillian O'Ruanaidh
db92e9d91c
Fix error from OrderCycle#distributor_shipping methods return ActiveRecord::Relation sometimes and Array other times
...
Now it will return ActiveRecord::Relation consistently.
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
5207dbf8c6
OrderCycle#distributor_shipping_methods should return all attachable ones by default per distributor, not per all distributors
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
a53a3259a8
Connect DistributorShippingMethods to OrderCycles instead of Spree::ShippingMethods
...
Before if a shipping method was shared between multiple distributors it could only be disabled/enabled on that order cycle for all the distributors which have that shipping method e.g. you couldn't select that shipping method for one distributor but disable it for another.
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
87431c188e
Use ShippingMethod :frontend method and drop :backend to avoid ClassLength Rubocop error
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
0673f9a5ae
Use a more simple layout on the order cycle checkout options form
...
Before there was a row for each distributor and a 'shared' row for shipping methods which were shared among more than one distributor. This layout displays a single list of shipping methods with the distributor or distributors it belongs to beside it as suggested by @lin-d-hop
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
80b7a5d39a
Remove OrderCycleShippingMethod model and use a :has_and_belongs_to_many association instead
...
Before the OrderCycleShippingMethod had a validation which checked the shipping method belonged to the order cycle distributor. Instead of this validation this just ignores shipping methods which don't belong to one of the order cycle's distributors when they are being attached in the OrderCycleForm service. This pattern is already being used in the OrderCycleForm service for ignoring Schedules that the person doesn't own.
Co-authored-by: Maikel <maikel@email.org.au >
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
541a340dcf
If an OrderCycle or Spree::ShippingMethod is destroyed then remove it's associated OrderCycleShippingMethod records too
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
593da4996f
A shop won't be shown as open if it doesn't have useable shipping method so these shipping method validations are really necessary
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
ed13ee6cbc
Fix association alignment in OrderCycle
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
f4a4f7c9ff
Remove validations checking order cycle has shipping methods
...
Instead we will make sure the order cycle is not available on the shopfront if it is doesn't have valid shipping methods. This will preven the issue where if one distributor deletes their shipping method, we don't want to invalidate the order cycle for all other distributors.
Co-authored-by: Maikel <maikel@email.org.au >
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
81730f725d
Enterprises shouldn't be considered ready for checkout if it only has backend shipping methods
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
67d4c38550
Rename :preferred_shipping_methods to :selected_shipping_methods on OrderCycle
...
It's a clearer name because 'preferred' implies there could be other unpreferred shipping methods available as well.
Co-authored-by: Maikel <maikel@email.org.au >
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
f25de984d2
Use .empty? instead of !exists? in app/models/order_cycle_shipping_method.rb
...
Co-authored-by: Maikel <maikel@email.org.au >
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
9a511e9e94
Rubocop adjustments
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
9296686384
Make backend, frontend scopes on Spree::ShippingMethod neater
...
Co-authored-by: Co-authored-by: Maikel <maikel@email.org.au >
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
f6c754839b
Make OrderCycleShippingMethod inherit from ApplicationRecord
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
fc4f951a1a
Only require OrderCycleShippingMethod records if people want to override the default shipping methods
...
It makes things much simpler if we return all shipping methods by default without needing OrderCycleShippingMethod records to be added to the database.
Co-authored-by: Maikel <maikel@email.org.au >
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
855ec1a708
Add new 'Checkout options' step to the edit order cycle form so people can attach shipping methods
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
1e817af5aa
Validate deleting a shipping method or switching it to backoffice only doesn't invalidate any order cycles
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
ca97a7f52d
Add :shipping_methods association to OrderCyle and validations
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
9a6e8a1113
Add an OrderCycleShippingMethod model to handle attaching shipping methods to order cycles
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
94d71b8dce
Remove extra unnecessary :display_on_checkout scope and reuse :frontend scope instead
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
a5daee39e3
Extract out a DISPLAY_ON_OPTIONS constant in Spree::ShippingMethod instead of magic strings
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
37617f63ea
Remove non-functional :backend scope from Spree::ShippingRate
...
It finds shipping methods where 'display_on != front_end' but :front_end values were removed in a1317be19b/db/migrate/20200508101630_convert_frontend_shipping_method_to_both.rb so it will always return true.
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
9b5f743fa5
Extract out a OrderCycle#simple? method so it can be used in models
2022-09-30 13:13:39 +01:00
Maikel Linke
8011d85968
Clarify updating only pre-existing customers
2022-09-29 12:06:06 +02:00
Maikel Linke
a7de56460d
Further simplify Order by outsourcing to service class
2022-09-29 12:06:06 +02:00
Maikel Linke
1f19642dad
Simplify Order by outsourcing to service class
...
This is work in progress and calling the service will be simplified in a
few commits.
2022-09-29 12:06:06 +02:00
Maikel Linke
a0260c4ff7
Move customer update logic to own service file
...
The Order class is too big already. We can move more code in the next
commits.
2022-09-29 12:06:06 +02:00