Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/store #125

Merged
merged 29 commits into from
Sep 21, 2015
Merged

Feature/store #125

merged 29 commits into from
Sep 21, 2015

Conversation

sanderpick
Copy link
Member

WIP: getting closer here, but still work to do mostly around dealing with taxes and shipping rates. Need an intermediate shipping form... we can get shipping estimates from shipwire (like below), which is slick.

{
    "message": "Successful",
    "resource": {
        "groupBy": "all",
        "rates": [
            {
                "serviceOptions": [
                    {
                        "serviceLevelCode": "GD",
                        "serviceLevelName": "Ground",
                        "shipments": [
                            {
                                "carrier": {
                                    "code": "USPS PMFS",
                                    "description": "USPS Priority Mail Flat Rate Small Box",
                                    "name": "USPS",
                                    "properties": [
                                        "trackable"
                                    ]
                                },
                                "cost": {
                                    "amount": 6.04,
                                    "converted": false,
                                    "currency": "USD",
                                    "name": "Total",
                                    "originalCost": 6.04,
                                    "originalCurrency": "USD",
                                    "type": "total"
                                },
                                "expectedDeliveryMaxDate": "2015-07-29T23:30:00-07:00",
                                "expectedDeliveryMinDate": "2015-07-28T23:30:00-07:00",
                                "expectedShipDate": "2015-07-27T01:30:00-05:00",
                                "pieces": [
                                    {
                                        "contents": [
                                            {
                                                "quantity": 2,
                                                "sku": "M3-Island-Brush"
                                            },
                                            {
                                                "quantity": 1,
                                                "sku": "M1-Island-Brush"
                                            }
                                        ],
                                        "height": {
                                            "amount": 1.63,
                                            "units": "in"
                                        },
                                        "length": {
                                            "amount": 8.630000000000001,
                                            "units": "in"
                                        },
                                        "subweights": [
                                            {
                                                "amount": 0.2009,
                                                "type": "packaging",
                                                "units": "lbs"
                                            },
                                            {
                                                "amount": 0.044730835069444,
                                                "type": "voidFill",
                                                "units": "lbs"
                                            },
                                            {
                                                "amount": 0.36,
                                                "type": "products",
                                                "units": "lbs"
                                            }
                                        ],
                                        "weight": {
                                            "amount": 0.60563083506944,
                                            "type": "total",
                                            "units": "lbs"
                                        },
                                        "width": {
                                            "amount": 5.38,
                                            "units": "in"
                                        }
                                    }
                                ],
                                "subtotals": [
                                    {
                                        "amount": 6.04,
                                        "converted": false,
                                        "currency": "USD",
                                        "name": "Shipping",
                                        "originalCost": 6.04,
                                        "originalCurrency": "USD",
                                        "type": "shipping"
                                    },
                                    {
                                        "amount": 0,
                                        "converted": false,
                                        "currency": "USD",
                                        "name": "Insurance",
                                        "originalCost": 0,
                                        "originalCurrency": "USD",
                                        "type": "insurance"
                                    },
                                    {
                                        "amount": 0,
                                        "converted": false,
                                        "currency": "USD",
                                        "name": "Packaging",
                                        "originalCost": 0,
                                        "originalCurrency": "USD",
                                        "type": "packaging"
                                    },
                                    {
                                        "amount": 0,
                                        "converted": false,
                                        "currency": "USD",
                                        "name": "Handling",
                                        "originalCost": 0,
                                        "originalCurrency": "USD",
                                        "type": "handling"
                                    }
                                ],
                                "warehouseName": "Chicago"
                            }
                        ]
                    },
                    {
                        "serviceLevelCode": "2D",
                        "serviceLevelName": "Second Day",
                        "shipments": [
                            {
                                "carrier": {
                                    "code": "USPS XP",
                                    "description": "USPS Express Mail",
                                    "name": "USPS",
                                    "properties": [
                                        "trackable"
                                    ]
                                },
                                "cost": {
                                    "amount": 34.5,
                                    "converted": false,
                                    "currency": "USD",
                                    "name": "Total",
                                    "originalCost": 34.5,
                                    "originalCurrency": "USD",
                                    "type": "total"
                                },
                                "expectedDeliveryMaxDate": "2015-07-27T23:30:00-07:00",
                                "expectedDeliveryMinDate": "2015-07-27T23:30:00-07:00",
                                "expectedShipDate": "2015-07-27T01:30:00-05:00",
                                "pieces": [
                                    {
                                        "contents": [
                                            {
                                                "quantity": 2,
                                                "sku": "M3-Island-Brush"
                                            },
                                            {
                                                "quantity": 1,
                                                "sku": "M1-Island-Brush"
                                            }
                                        ],
                                        "height": {
                                            "amount": 8.75,
                                            "units": "in"
                                        },
                                        "length": {
                                            "amount": 11.75,
                                            "units": "in"
                                        },
                                        "subweights": [
                                            {
                                                "amount": 0.64,
                                                "type": "packaging",
                                                "units": "lbs"
                                            },
                                            {
                                                "amount": 0.75994737413194,
                                                "type": "voidFill",
                                                "units": "lbs"
                                            },
                                            {
                                                "amount": 0.36,
                                                "type": "products",
                                                "units": "lbs"
                                            }
                                        ],
                                        "weight": {
                                            "amount": 1.7599473741319,
                                            "type": "total",
                                            "units": "lbs"
                                        },
                                        "width": {
                                            "amount": 8.75,
                                            "units": "in"
                                        }
                                    }
                                ],
                                "subtotals": [
                                    {
                                        "amount": 34.5,
                                        "converted": false,
                                        "currency": "USD",
                                        "name": "Shipping",
                                        "originalCost": 34.5,
                                        "originalCurrency": "USD",
                                        "type": "shipping"
                                    },
                                    {
                                        "amount": 0,
                                        "converted": false,
                                        "currency": "USD",
                                        "name": "Insurance",
                                        "originalCost": 0,
                                        "originalCurrency": "USD",
                                        "type": "insurance"
                                    },
                                    {
                                        "amount": 0,
                                        "converted": false,
                                        "currency": "USD",
                                        "name": "Packaging",
                                        "originalCost": 0,
                                        "originalCurrency": "USD",
                                        "type": "packaging"
                                    },
                                    {
                                        "amount": 0,
                                        "converted": false,
                                        "currency": "USD",
                                        "name": "Handling",
                                        "originalCost": 0,
                                        "originalCurrency": "USD",
                                        "type": "handling"
                                    }
                                ],
                                "warehouseName": "Chicago"
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "resourceLocation": null,
    "status": 200
}

@sanderpick
Copy link
Member Author

Stripe checkout handles a shipping address, but we need to make our own so we can show realtime shipping rates and add the user's choice to the total:

screenshot 2015-07-26 22 43 25

@sanderpick
Copy link
Member Author

Visual tweaks to sidebar products:

screenshot 2015-07-26 23 07 14

@eyalcohen
Copy link
Contributor

Very slick! Took a quick look at the branch... are you going to use the sidebar for all the products or just ones you want to highlight?

@sanderpick
Copy link
Member Author

I was thinking just sidebar for now - when we get more products, can do a page for each one? I suppose it's a little lazy to use the feed here to show the films for sale. The whole page should be a grid of products --- once the functionality is there, we should revisit

@sanderpick
Copy link
Member Author

flow for checkout... totally under estimated the complexity here. the "buy now" (needs a different icon) will skip the order review step:

img_0925

@sanderpick
Copy link
Member Author

WIP: sloppy but functional choose shipping flow:

screenshot 2015-08-19 08 54 04
screenshot 2015-08-19 08 55 51

the rest of the flow will be handled by the stripe checkout UI.

@sanderpick
Copy link
Member Author

rebase

@sanderpick
Copy link
Member Author

taking dollar billzzzz now... last step = create shipping order.

@sanderpick
Copy link
Member Author

Current flow is working in (island + stripe + shipwire) sandbox:

  • build shopping cart
  • checkout
  • give shipping address
  • choose shipping option (via shipwire rate api)
  • enter cc info (via stripe checkout) (last user step)
  • order is sent to shipwire warehouse
  • shipwire sends emails on our behalf (order received, tracking available, delivered)

TODO:

  • more error handling
  • show user confirmation in site
  • publish event to feed ("joe bought this", etc)
  • finish "buy now button"

@sanderpick
Copy link
Member Author

Completed:

  • more error handling
  • show user confirmation in site
  • finish "buy now button"

TODO:

  • publish event to feed ("joe bought this", etc)
  • style forms

@eyalcohen
Copy link
Contributor

yeah dude! Let me know if you want me to look it over

On Thu, Sep 3, 2015 at 10:11 PM Sander Pick [email protected]
wrote:

Completed:

  • more error handling
  • show user confirmation in site
  • finish "buy now button"

TODO:

  • publish event to feed ("joe bought this", etc)
  • style forms


Reply to this email directly or view it on GitHub
#125 (comment)
.

@sanderpick
Copy link
Member Author

definitely do! will spend monday trying to get this 100% ready for
deployment.

On Thu, Sep 3, 2015 at 10:55 PM, Eyal Cohen [email protected]
wrote:

yeah dude! Let me know if you want me to look it over

On Thu, Sep 3, 2015 at 10:11 PM Sander Pick [email protected]
wrote:

Completed:

  • more error handling
  • show user confirmation in site
  • finish "buy now button"

TODO:

  • publish event to feed ("joe bought this", etc)
  • style forms


Reply to this email directly or view it on GitHub
<
https://github.com/The-Island/island-app/pull/125#issuecomment-137650165>
.


Reply to this email directly or view it on GitHub
#125 (comment)
.

@sanderpick
Copy link
Member Author

def gonna want some unit test for this shit.

TODO:

  • publish event to feed ("joe bought this", etc)
  • style forms
  • write tests (unit, functional?)

On Fri, Sep 4, 2015 at 8:35 AM, Sander Pick [email protected] wrote:

definitely do! will spend monday trying to get this 100% ready for
deployment.

On Thu, Sep 3, 2015 at 10:55 PM, Eyal Cohen [email protected]
wrote:

yeah dude! Let me know if you want me to look it over

On Thu, Sep 3, 2015 at 10:11 PM Sander Pick [email protected]
wrote:

Completed:

  • more error handling
  • show user confirmation in site
  • finish "buy now button"

TODO:

  • publish event to feed ("joe bought this", etc)
  • style forms


Reply to this email directly or view it on GitHub
<
https://github.com/The-Island/island-app/pull/125#issuecomment-137650165>
.


Reply to this email directly or view it on GitHub
#125 (comment)
.

@sanderpick
Copy link
Member Author

The "style forms" task turned out to be a lot of work... here's the flow:

screenshot 2015-09-07 23 20 37
screenshot 2015-09-07 23 21 27
screenshot 2015-09-07 23 21 40
screenshot 2015-09-07 23 21 56
screenshot 2015-09-07 23 23 30
screenshot 2015-09-07 23 22 33

@sanderpick
Copy link
Member Author

The "processing step" loads a random GIF tagged with "processing" (the animating framework) from the Giphy API haha... kinda goofy but I like it.

TODO:

  • Launch live store under a hidden URL and verify everything is working well with our Shipwire agent. When we check shipping rates their API does some address validation but it doesn't seem too strict... need to check on that, esp. for international addresses.
  • Check and tweak shipping notification email templates within shipwire
  • Tests (ugh, this could take a long time... tempted to skip for now :)

@sanderpick
Copy link
Member Author

Shipping address preferences now in settings:

screenshot 2015-09-07 23 36 15

@sanderpick
Copy link
Member Author

^^ option to save when ordering...

@sanderpick
Copy link
Member Author

Store is hidden for testing, replaced with old films page. @eyalcohen , think you're traveling - if not wanna have a look? Lets get this merged and deployed for some test shipments.

@varmlandsmaskinen
Copy link

I will buy some shit for testing if you need another test bunny

On Sep 10, 2015, at 12:12 AM, Sander Pick [email protected] wrote:

Store is hidden for testing, replaced with old films page. @eyalcohen https://github.com/eyalcohen , think you're traveling - if not wanna have a look? Lets get this merged and deployed for some test shipments.


Reply to this email directly or view it on GitHub #125 (comment).

@sanderpick
Copy link
Member Author

@varmlandsmaskinen that would be sick... will let you know when it's up!

@eyalcohen
Copy link
Contributor

Hey dude, pretty excited about this. Looks great. Here are some comments:

  • Should be some way to look at the cart before having to provide shipping info.
  • If you're on the /store route, I don't think we need to show recent ascents or blog postings.
  • On the single-click purchase button, maybe add something that says 'Buy Now'

Minor stuff:

  • Some kind of fadein for .cart-button when an item is added to the cart would be cool.
  • CC info modal looks really nice, but the font on the icon looks too small.

@eyalcohen
Copy link
Contributor

Increased the timeout for the failing test, should be good now

@sanderpick
Copy link
Member Author

Yep yep, makes sense.

  • Should be some way to look at the cart before having to provide shipping info.
    How bout a small summary above shipping info modal?
  • If you're on the /store route, I don't think we need to show recent ascents or blog postings.
    +1
  • On the single-click purchase button, maybe add something that says 'Buy Now'
    +1
  • Some kind of fadein for .cart-button when an item is added to the cart would be cool.
    We could show a flash alert whenever an item is added?
  • CC info modal looks really nice, but the font on the icon looks too small.*
    The font on the logo icon? Maybe we can just do the black and white with bigger text. Will give it a shot.

@eyalcohen
Copy link
Contributor

Everything you wrote sounds good to me. Getting close!

@sanderpick
Copy link
Member Author

review fixes in 688c69e

pending store tests...

@sanderpick
Copy link
Member Author

"Checkout" with cart adds this screen to beginning of flow. User can edit cart. "Buy Now" button skips this modal, goes right to shipping.

screenshot 2015-09-16 00 10 41

@sanderpick
Copy link
Member Author

Shipping rate tests are in a162fb2.

Checkout tests pending...

We'll have to do UI tests someday -> #140

@eyalcohen
Copy link
Contributor

hey! looks great! I have one really minor thing, which is the 'Gotcha. How Does this Look?' modal should also display the shipping information since its the last opportunity to confirm it.

But in general, lets get this live so I can get some brushes :)

@sanderpick
Copy link
Member Author

Good call dude. I added the "ships" and "delivered by" dates to the last screen under the shipping carrier section. Also added the order email to the final confirmation.

The Shipwire sandbox must function a little differently than the live APIs... I have to manually mark an order as shipped for the first "received at warehouse" email to be kicked off. If this is not the case in the live situation, we'll need to send our own email so they get something from us immediately, not in a couple hours (or days over the weekend) when the order is automatically marked as shipped, but we don't want duplicates about order receiving. In any case, they'll get a billing confirmation email from Stripe.

sanderpick added a commit that referenced this pull request Sep 21, 2015
@sanderpick sanderpick merged commit 8f48f6f into develop Sep 21, 2015
@sanderpick sanderpick deleted the feature/store branch September 21, 2015 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants