shopify

Shopify - Get shop domain inside a app

可紊 提交于 2019-11-28 02:04:34
I'm new to Shopify app developing and I'm using Node,Express for the back-end and react with polaris libaray. My question is how to get the shop's domain the request is initiating throug h the app. When I searched I could only found one used in Ruby ShopifyAPI::Shop.current and I'm looking for the similar thing to use in node? For examples check out https://github.com/BKnights/kotn-shopify-utils Yes it uses a session. The code is pretty idiosyncratic. I published it mostly as an easy way to share between my own projects but it's worked pretty well for those. If you use this where you may scale

Shopify API: Create a Promotion?

为君一笑 提交于 2019-11-27 17:53:01
问题 Using the Shopify API, is there a way to creation promotions for your store? If not, is there a way to programmatically create promotions in Shopify? (short of using CURL posts to the admin) That is, I can create a promotion by hand using the admin and navigating to the Promotions and clicking the Add a discount code link. I'd like to be able to do the same thing programmatically, or to know for certain this isn't possible. I don't see any obvious method on the api list, but it seems like

Convert string to integer in Shopify Liquid?

落爺英雄遲暮 提交于 2019-11-27 11:08:41
问题 I just read this related answer: How can I convert a number to a string? - Shopify Design — Ecommerce University To convert a string to a number just add 0 to the variable: {% assign variablename = variablename | plus:0 %} Not super elegant but it works! Inelegant or not, the answer given there isn't working for me. What's the right way to do this? Are the Liquid docs really missing such basic answers or am I just not finding the right place to look? 回答1: Using assign with a math filter is