Refactoring digital shipping calculation and display
* removed the deface override that modified the checkout/_delivery partial * created custom digital delivery calculator * removed digital_shipping_method from Spree::Order. Moved logic to available_shipping_methods monkey patch The main goal was to eliminate the shipping method detection logic from the _delivery partial. This was a bit of a hack all along and didn't really present the correct information to the underlying order logic (i.e. rate_hash.blank? would return true when there was no shipping options available). This should be more future proof and make overriding another aspect of the delivery process easier.
This commit is contained in:
@@ -49,6 +49,20 @@ describe Spree::Order do
|
||||
order.digital?.should be_false
|
||||
end
|
||||
end
|
||||
|
||||
context "digital shipping" do
|
||||
before do
|
||||
# TODO create digital shipping factory
|
||||
end
|
||||
|
||||
it "should only offer digital shipping if all items are digital" do
|
||||
|
||||
end
|
||||
|
||||
it "should not offer digital shipping if only some items are digital" do
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user