Code Monkey home page Code Monkey logo

Comments (12)

maartenvg avatar maartenvg commented on August 21, 2024

@costford @csaunders. It should not be possible to set source_name like
this, iirc.
On Jun 21, 2014 9:11 PM, "Various Authors" [email protected] wrote:

Took me a few hours, but I finally managed to track down this
"undocumented feature".

In my app, I was unable to turn off send_receipt and
send_fulfillment_receipt behaviours for order creation. I could create
orders in the console just fine, no receipt would be sent, but in my sweet
app any order creation for a real order would result in emails being sent.

Here is a simple example, in which I create an order twice. Once with the
params from the API docs for order creation
http://docs.shopify.com/api/order#create, and once with the additional
field source_name: "web".

these are the params from the API docsShopifyAPI::Order.create({

order: {
    email: "[email protected]",
    fulfillment_status: "fulfilled",
    line_items: [ {
        variant_id: 396134081,
        quantity: 1
    }]
}})

same params, but with source_name: "web"ShopifyAPI::Order.create({

order: {
    email: "[email protected]",
    fulfillment_status: "fulfilled",
    source_name: "web",
    line_items: [ {
        variant_id: 396134081,
        quantity: 1
    }]
}})

The first one fires just fine, creating a resource and not sending email
to razmantle. The second sends an order confirmation message to our
honoured friend. I've also tried the same experiment with send_receipt
explicitly set to false, which is ignored.

I've included a screenshot of razmantle's mailbox...
[image: razmantle's inbox]
https://camo.githubusercontent.com/3f7cf29a2323028005a3199787f299925ffb7922/687474703a2f2f692e696d6775722e636f6d2f666c4e505050792e706e67

After running the following commands in the console...
[image: console talk]
https://camo.githubusercontent.com/ba5a1d38765cf8531c0fc874d8304dee66c2886d/687474703a2f2f692e696d6775722e636f6d2f6c5a43583679742e706e67

No hard feelings, folks: I'm just glad to be able to move on with my life
^o^//


Reply to this email directly or view it on GitHub
#134.

from shopify-api-ruby.

costford avatar costford commented on August 21, 2024

Huh. It shouldn't. Looking now

from shopify-api-ruby.

costford avatar costford commented on August 21, 2024

Oh right, it changed from an actual errors.add to just a warning. It is probably time to change that back again. Waiting for @Smcchoi to confirm the warehouse no longer relies on source, then I can remove half of the code in HasSourceName. I can change this back to an actual 422 at the same time.

from shopify-api-ruby.

costford avatar costford commented on August 21, 2024

Is the send_receipt param not supposed to control exactly what he's looking for?

from shopify-api-ruby.

ekkyou avatar ekkyou commented on August 21, 2024

@costford we have at least 144 orders with null source_name

from shopify-api-ruby.

ekkyou avatar ekkyou commented on August 21, 2024

@costford 73,245 for checkouts

from shopify-api-ruby.

costford avatar costford commented on August 21, 2024

sigh we had 1 checkout and 0 orders with null source_name last I checked. I will have to dive back into this again

from shopify-api-ruby.

costford avatar costford commented on August 21, 2024

So, did you mean this source_name column is null in the warehouse (not production)? Over the last week, I touched the updated_at for every single checkout and order... is that not sufficient to load the production data into the warehouse?

checkouts-with-null-source-name

orders-with-null-source-name

from shopify-api-ruby.

costford avatar costford commented on August 21, 2024

I do see what you mean wrt the warehouse:

screen shot 2014-06-24 at 1 21 16 pm
screen shot 2014-06-24 at 1 21 02 pm

Anything special I should be doing to get the values propagated from production, or are you still looking into it, @Smcchoi ?

from shopify-api-ruby.

ekkyou avatar ekkyou commented on August 21, 2024

@costford so i tracked it down it's b/c those no longer exists in checkouts and orders in shopify. If you think those are deleted on purpose. Then I can go ahead and switch all of our definitions to use the new columns.

from shopify-api-ruby.

costford avatar costford commented on August 21, 2024

Funny, that just came up in discussion-- we were wondering if a Shop move would cause this, or what. In any case, if that data does not exist in production it's meaningless, so please go ahead and switch all the definitions to use source_name when you have a chance! (quick reminder that browser became web and mobile became iphone!)

Thanks again.

from shopify-api-ruby.

benjlcox avatar benjlcox commented on August 21, 2024

source_name is now a protected attribute

from shopify-api-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.