by the spree team right?) uses it:
http://spreeworks.com/support/sales-tax.html
On Saturday, December 8, 2012 3:18:22 PM UTC-5, Michael Bianco wrote:
I've written an extension that pulls tax data from a DB table... but you
could easily modify it to work off an external API.
https://github.com/iloveitaly/spree_local_tax/blob/master/app/models/spree/calculator/local_tax.rb
Hope this helps,
- Mike
--I've written an extension that pulls tax data from a DB table... but you
could easily modify it to work off an external API.
https://github.com/iloveitaly/spree_local_tax/blob/master/app/models/spree/calculator/local_tax.rb
Hope this helps,
- Mike
On Friday, December 7, 2012 4:31:08 PM UTC-5, Jet wrote:
I am attempting to write a Spree extension for TaxCloud, spree_cloud_tax:
https://github.com/bluehandtalking/spree_cloud_tax.git
At this point I have done the easy part, getting a lookup from TaxCloud,
and the calculator taxing items in the cart.
However, could really use some pointers on the next steps, as I
have never attempted an extension before, no in-depth familiarity
with Spree.
Class Transaction is the workhorse of the tax_cloud gem,
which spree_cloud_tax utilizes.
lookup, authorized, capture, authorized_with capture,
returned
1) I need to create a table to save authorized transactions,
transitional lookups (unless this could be done in a session
variable?)
Should an order belong_to a transaction?
2) Since the purpose of TaxCloud is to provide a unique tax
rate given the order shipping address, is the TaxRate table
still the place to store the tax rate, and if so what would the
Cardinality be between them?
3) After an order is authorized through a payment gateway,
there need to be a callback for @transaction.authorized
Would that need to be set up within the state machine,
and what would that look like? Similar to below
order_decorator.rb
Spree::Order.state_machine.after_transition :to => 'complete',
:do => "{
transaction.order_id = 100
transaction.authorized_with_capture }"
(would need to be able to set order_id, and how is scope available here?)
Thanks!
Jet
oh, and if anyone has already worked out the strategy, etc for this would
be great if they shared!
I am attempting to write a Spree extension for TaxCloud, spree_cloud_tax:
https://github.com/bluehandtalking/spree_cloud_tax.git
At this point I have done the easy part, getting a lookup from TaxCloud,
and the calculator taxing items in the cart.
However, could really use some pointers on the next steps, as I
have never attempted an extension before, no in-depth familiarity
with Spree.
Class Transaction is the workhorse of the tax_cloud gem,
which spree_cloud_tax utilizes.
lookup, authorized, capture, authorized_with capture,
returned
1) I need to create a table to save authorized transactions,
transitional lookups (unless this could be done in a session
variable?)
Should an order belong_to a transaction?
2) Since the purpose of TaxCloud is to provide a unique tax
rate given the order shipping address, is the TaxRate table
still the place to store the tax rate, and if so what would the
Cardinality be between them?
3) After an order is authorized through a payment gateway,
there need to be a callback for @transaction.authorized
Would that need to be set up within the state machine,
and what would that look like? Similar to below
order_decorator.rb
Spree::Order.state_machine.after_transition :to => 'complete',
:do => "{
transaction.order_id = 100
transaction.authorized_with_capture }"
(would need to be able to set order_id, and how is scope available here?)
Thanks!
Jet
oh, and if anyone has already worked out the strategy, etc for this would
be great if they shared!
You received this message because you are subscribed to the Google Groups "Spree" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/M34lQh6sJhMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.