LoginSignup
3
2

More than 3 years have passed since last update.

[Shopify] 2月の更新をまとめました

Posted at

もう3月・・速いですね。早いですね。何月になってもプロジェクトにひたすら追われておりますが、一息休憩がてらに
Shopify、2月の更新をまとめました。

02月27日APIヘルスレポートで開発しているAPPに影響のあるAPIを確認できるようになりました。

パートナーダッシュボードより、下記にてAPIヘルスが確認項目として追加されています。
image.png

詳細はこちらを参照してください。
https://shopify.dev/concepts/about-apis/versioning/api-health

02月14日customerActivateByUrlでユーザーを有効化

GraphQLを使い下記のようにユーザーを作成することができます。

mutation customerCreate($input: CustomerCreateInput!) {
  customerCreate(input: $input) {
    customerUserErrors {
      code
      field
      message
    }
    customer {
      id
    }
  }
}

また、作成したユーザーに対して有効化リンクを送ることができるようになりました。2020-04以降のEndpointで有効です。

POST /api/2020-04/graphql.json

mutation($activationUrl: URL!, $password: String!){
  customerActivateByUrl(
    activationUrl: $activationUrl,
    password: $password
  ) {
    customer { id }
    customerUserErrors { code field message }
  }
}

{
  "activationUrl": "https://a-merchant-store.myshopify.com/account/activate/2198995959864/66741d7259ddfcd54962e2f4989a28b0-1581021688",
  "password": "dihwlDJ37^&j"
}

詳細は下記を参照してください。
https://shopify.dev/tutorials/update-customer-data-with-storefront-api

こちらはまた、 
https://qiita.com/syantien/items/b03307b70c38dbd61130
の続きとして詳細書きたいと思います。

02月14日 新!?customerAccessTokenCreateWithMultipassでユーザーログイン

これに関しては何が更新されたのか・・まだ確認中です・・

(たまたま)最新Multipassに関してはこちらでも記事まとめましたので参照ください。
https://qiita.com/syantien/items/b03307b70c38dbd61130

02月11日 ストアーのステータス確認方法がアップグレードされました。

現在Shopifyサービス全体のステータスはこちらで確認することができます。
https://shopifystatus.com/

今回は自身のサイトのステータスを確認できるようになりました。(Shopify SSOでストアをリンクしてある必要があります)

全体(ログインしてない状態)

image.png

自身のサイト

image.png

02月11日 Shopify App Store内の検索広告が一部パートナーに公開

Qualified Partnerと記載があり基準がわかりませんが、一部パートナーにApp Store内の検索広告が公開されました。プロモートしたいAppを今後広告でブーストすることができるそうです。

詳細は下記を参照ください。
https://shopify.dev/concepts/app-store/advertising

02月05日 article.updated_atcart.attributes/cart/add.jsの更新

article.updated_at

article.updated_atは記事が更新された日付を返すようになりました。この値を使ってGoogle検索用の構造型データを生成することができます。

article.updated_atの詳細下記を参照ください。
https://shopify.dev/docs/liquid/reference/objects/article#article-updated_at

cart.attributes

ダブルアンダースコアー __をattribute-nameの前に使えることによってattribute-nameをプライベートにすることができます。プライベート化された値はLiquidやAjaxAPIから読むことができません。ページのレンダリングに影響しない値の場合はこの手法を活用することによってより効率的なページキャッシングを行うことができます。

cart.attributesの詳細下記を参照ください。
https://shopify.dev/docs/liquid/reference/objects/cart#cart-attributes

/cart/add.js

複数のアイテムを一度のコールで追加することができるようになりました。以前は1コールに対して1アイテムしか追加できなかったところ複数アイテムを1コールで追加することによってコール数を減らすことができます。

詳細はこちらを参照ください。
https://shopify.dev/tutorials/develop-theme-getting-started-using-ajax-api#add-to-cart

jQuery.post('/cart/add.js', {
  items: [
    {
      quantity: 1,
      id: 794864229,
      properties: {
        'First name': 'Caroline'
      }
    },
    {
      quantity: 2,
      id: 826203268,
      properties: {
        'First name': 'Mike'
      }
    }
  ]
});

items[]と配列型となっています。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2