Hi all,

I've been digging into how to calculate shipping and tax from the shopping
cart, using just a country and zipcode.
(read: before the user has entered a full ship_address)
As expected, only providing a country and zip causes the ship_address to
fail a bunch of validations. I've come up with 2 different ways I could
tackle this:

Option A) Insert dummy data into the ship_address to allow it to pass
validations, then remove the dummy data on the Checkout#address step.

Option B) Create an entirely different path to computing the calculators,
such that they don't depend on order.ship_address being a valid, saved
object.

What would you suggest? Has anyone come up with an elegant solution for
this? Any ideas would be greatly appreciated.

-Marc

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedOct 9, '14 at 2:37a
activeOct 9, '14 at 9:48a
posts2
users2
websitespreecommerce.com
irc#RubyOnRails

2 users in discussion

Christian Koch: 1 post Marc L: 1 post

People

Translate

site design / logo © 2022 Grokbase