shopify

Color Swatch / Variant dropdown list for shopify products

霸气de小男生 提交于 2019-12-03 17:15:58
What I intend to do is to do a dropdown list for the product 'color' variant, however with some sort of association with the option value, an image swatch or jpg is displayed. I found this tutorial to do association of color swatches with product color choice. However, this displays variants in a button form instead of the defaul dropdown. http://docs.shopify.com/manual/configuration/store-customization/add-color-swatches-to-your-products I've been messing about with the scripts but I never got around to getting what I needed. so here I am for a little bit of help. Here's my variant list:

Shopify API, unable to create order

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I created private application on my test shop and I am trying to create simple order via the Shopify API following the instructions found here: http://docs.shopify.com/api/order#create I am using the last example, and sending POST request to admin/orders.json with this in the body of the request: { "order" : { "line_items" : [ { "quantity" : 1 , "variant_id" : 500775053 } ] } } 500775053 is a valid variant id. The response I'm getting is: { "errors" : { "line_items" : [ "must have at least one line item" ] } } I don't understand

Shopify order webhooks

不问归期 提交于 2019-12-03 05:35:05
I looked into the different order webhooks and was wondering when they are triggered. This is what I figured out so far: orders/updated is fired whenever an order is changed in any way, including when an order is created (even before it was authorized and orders/create is fired), closed or cancelled orders/create is fired when the user authorizes the payment orders/paid is fired when the merchant accepts the payment orders/fulfilled is fired when the merchant fulfills the order orders/cancelled is fired when the order is cancelled Since orders/updated is also fired whenever the other hooks are

How to catch the HTTP POST request sent by a Shopify Webhook

梦想的初衷 提交于 2019-12-03 04:22:34
问题 I'm somewhat of a noob, and not afraid to admit that, I'm working on this project as a learning experience to get better with php and serverside script/ing handling. I'm trying to come up with a way to use Shopify and simultaneously update an off server database every time an order is fulfilled from my Shopify cart. So for example, someone buys something from my online store, I want it to update my home databases inventory to show that it now has one less item. I've come to the conclusion

Unable to receive a permanent access token for my Shopify App

老子叫甜甜 提交于 2019-12-03 00:42:00
I'm following the Shopify instructions to get a permanent token for a particular app/shop combination ( http://api.shopify.com/authentication.html ). I'm able to get the temporary token and then use a simple html form to receive a permanent token: But the response I get is: {"error":"invalid_request"} Can you help me, please? I searched everywhere (Stackoverflow, Shopify support forums, etc...) but cannot find a clue on how to solve this. My app is online and hosted on Heroku. Thanks, I think we have similar minds! I was experiencing the exact same issue as you. I think we were both confused

Shopify.onItemAdded update #cart and cart.item.count

不问归期 提交于 2019-12-02 20:04:28
问题 I'm trying to make a ajaxed shopping cart in Shopify. I have made the product page add an item to cart without refreshing or going to the cart page. To see cart, you can click on an input or link with .cart-show, so I added this to the 'add to cart' input: <input style="margin-top: 40px; width: 50%;" type="submit" value="Add to cart" class="button cart-show" onclick=" Shopify.addItemFromForm('add-item-form'); return false" /> What that does, is simply add the item to cart and display the cart

How to catch the HTTP POST request sent by a Shopify Webhook

人走茶凉 提交于 2019-12-02 17:46:46
I'm somewhat of a noob, and not afraid to admit that, I'm working on this project as a learning experience to get better with php and serverside script/ing handling. I'm trying to come up with a way to use Shopify and simultaneously update an off server database every time an order is fulfilled from my Shopify cart. So for example, someone buys something from my online store, I want it to update my home databases inventory to show that it now has one less item. I've come to the conclusion that the best way to do this would be to setup a webhook notification that sends an HTTP POST request to

shopify how to get product data using php in my localhost

南楼画角 提交于 2019-12-02 16:45:22
问题 I am looking a php script to get shopify product data by using php in my localhost server.I have already created storefront api but don't have idea about it that how we will call using api key and fetch data. I read a lot of document which are related to same but nothing explore for php. https://help.shopify.com/api/storefront-api/getting-started#using-curl If anybody know about it please help me. 回答1: you can make simple curl request for getting products detail using shopify admin api

Verify Shopify webhook

末鹿安然 提交于 2019-12-02 14:08:36
问题 I believe that to have a Shopify webhook integrate with a Rails app, the Rails app needs to disable the default verify_authenticity_token method, and implement its own authentication using the X_SHOPIFY_HMAC_SHA256 header. The Shopify docs say to just use request.body.read . So, I did that: def create verify_webhook(request) # Send back a 200 OK response head :ok end def verify_webhook(request) header_hmac = request.headers["HTTP_X_SHOPIFY_HMAC_SHA256"] digest = OpenSSL::Digest.new("sha256")

Error Creating Shopify Webhook through the API

对着背影说爱祢 提交于 2019-12-02 13:24:57
问题 I am trying to create a Webhook through the API. When the Customer installs the app (Controller): def init_webhooks topics = ["products/create", "products/update", "products/delete"] topics.each do |topic| webhook = ShopifyAPI::Webhook.create(format: "json", topic: topic, address: "http://#{@current_host}/webhooks/#{topic}") raise "Webhook invalid: (#{topic}) #{webhook.errors}" unless webhook.valid? end end Here is the error from the log: RuntimeError (Webhook invalid: (products/create) #