Pau Perez
a3b2a25ccf
Refactor and reuse :not_state scope
2021-03-03 18:19:26 +01:00
Pau Pérez Fabregat
7f4849da25
Merge pull request #6971 from Matt-Yorkley/dead-code-assassin
...
Remove dead code Order#display_ship_total
2021-03-01 10:07:30 +01:00
Pau Pérez Fabregat
8d31ba2677
Merge pull request #6966 from Matt-Yorkley/dead-code-totals
...
Dead code of the week
2021-03-01 10:05:31 +01:00
Matt-Yorkley
4c3ff402e6
Remove dead code Order#display_ship_total
2021-02-28 13:49:38 +00:00
Matt-Yorkley
16eff698df
Remove dead code; Spree::Order #line_item_adjustment_totals and #price_adjustment_totals
2021-02-27 11:56:44 +00:00
Andy Brett
7bb49b51fd
use scope on payment model
2021-02-26 07:44:08 -08:00
Pau Pérez Fabregat
d513dc31de
Merge pull request #6905 from jibees/6498-show-unit-price-in-checkout
...
Show unit price in checkout process (both cart page and cart sidebar)
2021-02-24 11:59:25 +01:00
Matt-Yorkley
9852470ef6
Merge pull request #6913 from Matt-Yorkley/rails-5-backports
...
Rails 5 backports
2021-02-23 11:55:31 +01:00
Maikel
3e0547f563
Merge pull request #6926 from andrewpbrett/check-nan
...
Ensure unit_value is a number
2021-02-23 10:40:00 +11:00
Matt-Yorkley
0e3429dc35
Merge pull request #6758 from Matt-Yorkley/enterprise-fees-refactor
...
Enterprise fees refactor
2021-02-22 17:59:18 +01:00
Andy Brett
5dcda317d2
add bugsnag alert
2021-02-21 22:27:58 -08:00
Andy Brett
e06843c445
ensure unit_value is a number
2021-02-19 14:38:08 -08:00
Jean-Baptiste Bellet
ee4943f6e2
Display unit price on /cart page
...
- Use a new class to specify css customization
- Add to `line_item.rb` a fake method: `unit_price_price_and_unit` @andrewpbrett will change it with real values.
- Add a new variable: $text-xs to specify small font-size
squash "Display unit price on /cart page"
2021-02-18 15:02:30 +01:00
Matt-Yorkley
219c982db7
Re-implement pre-Rails-5 versions of #implement! and #decrement! on Spree::LineItem
...
Rails 5 introduced some breaking changes to these built-in methods, and the new versions no longer work correctly in relation to decrementing stock with VariantOverrides.
2021-02-18 12:28:24 +00:00
Matt-Yorkley
18a354ec1e
Fix private method called
...
```
Failure/Error: variant.stock_items.first.update_attribute(:count_on_hand, 10)
NoMethodError:
private method `count_on_hand=' called for #<Spree::StockItem:0x00005573998948a8>
Did you mean? count_on_hand
count_on_hand?
count_on_hand_was
# ./spec/models/spree/variant_spec.rb:249:in `block (5 levels) in <module:Spree>'
# -e:1:in `<main>'
```
2021-02-18 12:20:29 +00:00
Matt-Yorkley
42a5d7cdc7
Delete dead code Variant#set_option_value
2021-02-17 14:27:51 +00:00
Matt-Yorkley
105f59d959
Delete dead code Variant#default_price?
2021-02-17 14:27:51 +00:00
Matt-Yorkley
4213f66afb
Delete dead code Variant#name_and_sku
2021-02-17 14:27:51 +00:00
Matt-Yorkley
d06fee026c
Delete dead code Variant#on_backorder
2021-02-17 14:27:51 +00:00
Matt-Yorkley
81ac2c5add
Delete code related to :cost_price field
2021-02-17 14:27:51 +00:00
Andy Brett
0a7396eb1c
Merge pull request #6713 from andrewpbrett/sca-subs-emails
...
Send emails when subscription payments require SCA auth
2021-02-12 08:23:32 -08:00
Pau Pérez Fabregat
34ce3c0db1
Merge branch 'master' into remove_pin
2021-02-11 11:19:18 +01:00
Andy Brett
9104ca72a9
refactor to descriptive method authorization_action_required?
2021-02-10 09:36:35 -08:00
Pau Pérez Fabregat
ed1c1e5607
Merge pull request #6823 from Matt-Yorkley/dead-code-shipment
...
Dead code: Shipment#total_cost
2021-02-08 13:44:14 +01:00
Maikel
173cf9e536
Merge pull request #6565 from Matt-Yorkley/adjustments-inclusive
...
[Adjustments] Improve inclusive/additional tax recording
2021-02-08 09:38:31 +11:00
Matt-Yorkley
14530ddbc5
Remove dead code: Shipment#total_cost
2021-02-07 13:41:44 +00:00
Matt-Yorkley
8d6468dab1
Remove dead code: Shipment#display_total_cost
2021-02-07 13:41:40 +00:00
Luis Ramos
c0ddeceb1e
Remove Pin Payments
2021-02-06 11:15:48 +00:00
Pau Pérez Fabregat
3ab6da03e7
Merge pull request #6296 from luisramos0/remove_migs
...
Remove Migs payment gateway
2021-02-04 22:07:35 +01:00
Luis Ramos
e69eefdc0f
Remove Migs payment gateway
2021-02-03 21:41:40 +00:00
Andy Brett
6e735739a5
after customer auth + redirect, process payment and clear cvv_response_message
2021-02-03 09:50:37 -08:00
Andy Brett
558b01896f
extract url helpers to helper module
2021-02-03 09:50:37 -08:00
Pau Pérez Fabregat
79f98bdfa7
Merge pull request #6770 from Matt-Yorkley/more-dead-code
...
Dead code: Spree::Order#clear_adjustments
2021-02-03 09:37:42 +01:00
Matt-Yorkley
0e82160b76
Touch the updated_at column when updating records via #update_column
...
#update_column(s) skips callbacks (which is useful), but it doesn't change the updated_at field on the record by default (which we should be doing in these cases).
This change is made in Spree 2.2 here: b367c629ce
2021-01-30 12:49:38 +00:00
Matt-Yorkley
8466ab5675
Extract more OFN fee-handling code from Spree::Order class
2021-01-29 22:51:21 +00:00
Matt-Yorkley
793baca44f
Update fees on single line item and then order fees in LineItemsController#delete
...
Fees on other line items are left alone (not recreated), and whatever fees on the order are updated.
2021-01-29 21:53:11 +00:00
Matt-Yorkley
ce5f9a9a94
Update existing closed order fees when deleting line items on completed orders in LineItemsController#delete
...
Whatever fee adjustments there are on other line items should be left alone (not recreated), and whatever fee adjustments are already on the order should just be updated.
2021-01-29 21:53:11 +00:00
Matt-Yorkley
58c7c90624
Refactor methods for updating closed adjustments
2021-01-29 21:53:11 +00:00
Matt-Yorkley
dffa4d4f39
Update order methods delegation
2021-01-29 21:53:09 +00:00
Matt-Yorkley
3ecdfca9cf
Rename fee adjustment clear-all method
2021-01-29 21:52:28 +00:00
Matt-Yorkley
9abf6cdcdf
Rename expensive method Order#update_distribution_charge!
...
This method is named "update distribution charge". What this method actually does is delete all of the fee adjustments on an order and all it's line items, then recreate them all from scratch. We call this from lots of different places all the time, and it's incredibly expensive. It even gets called from inside of transactions being run inside callbacks. Renaming it hopefully will add a bit of clarity.
This needs to be a lot more granular!
2021-01-29 21:52:28 +00:00
Matt-Yorkley
785cdf9bdc
Extract order fees logic to service
2021-01-29 21:52:27 +00:00
Matt-Yorkley
fc06e5e4c3
Remove dead code Spree::Order#clear_adjustments
2021-01-29 19:58:05 +00:00
Matt-Yorkley
e7866db7b1
Improve efficiency in applying enterprise fees in Order#update_distribution_charge!
2021-01-29 18:32:26 +00:00
Matt-Yorkley
e4d7e03903
Merge pull request #6740 from Matt-Yorkley/carts-cleanup
...
Remove old abandoned carts
2021-01-29 12:32:16 +01:00
Matt-Yorkley
4f7c8062a1
Create class to map join table and simplify code
2021-01-28 21:51:50 +00:00
Matt-Yorkley
dcbe9c4011
Merge pull request #6756 from andrewpbrett/fix-sca-regression
...
Fix SCA regression
2021-01-28 19:45:08 +01:00
Matt-Yorkley
c65f623ed8
Memoize and simplify objects being checked in Order#provided_by_order_cycle?
2021-01-28 01:02:57 +00:00
Maikel
8a757812e7
Merge pull request #6735 from coopdevs/enable-mail-delivery-always
...
Enable mail delivery always
2021-01-28 09:31:12 +11:00
Matt-Yorkley
f49355e5d3
Merge pull request #6724 from Matt-Yorkley/remove-price-adjustments
...
Delete dead code Spree::Order#price_adjustments
2021-01-27 23:29:38 +01:00