shopify

How to request shopify graphql-admin-api from an api?

寵の児 提交于 2019-12-11 17:58:38
问题 I am trying to request shopify graphql-admin-api from my api. I am doing it according to the documentation given by graphql-admin-api, but it still gives me authorization errors. 回答1: PHP users can follow this function to make request to Shopify Admin API using GraphQL I am using GuzzleHttp ( PHP HTTP client ) to create request public function graph($query , $variables = []){ $domain = 'xxx.myshopify.com'; $url = 'https://'.$domain.'/admin/api/2019-10/graphql.json'; $request = ['query' =>

Tying mandatory agreement in Shopify ../cart page to multiple products

匆匆过客 提交于 2019-12-11 16:27:39
问题 I've added a mandatory acknowledgment to my Shopify cart page that is displayed when I'm running pre-order sales for certain products. {% for item in cart.items %} {% if item.product.tags contains 'DECEMBER' %} <div class="sixteen columns"> <p style="float:none; text-align:left; clear: both; margin: 10px 0;"> <input style="float:none; vertical-align:middle;" type="checkbox" id="agree" /> <label style="display:inline; float:none" for="agree"> <b>I acknowledge that Company Name will charge my

How to display single product tag name in Shopify?

做~自己de王妃 提交于 2019-12-11 15:50:15
问题 I have more than 20 products and each product have 2-3 tags. I am displaying all the product tags using this code {% for tag in collection.all_tags %} {% assign products_count = 0 %} {% for product in collection.products %} {% if product.tags contains tag %} {% assign products_count = products_count | plus: 1 %} {% endif %} {% endfor %} <a class="filter__link" href="/collections/{% if collection.handle != blank %}{{ collection.handle }}{% else %}all{% endif %}/{{ tag | handleize }}"{% if

Current tag displaying more than one tag name in Shopify

折月煮酒 提交于 2019-12-11 15:43:52
问题 I am displaying the product tags. If the user clicked on All products filter then It will display only first single tag. If the user clicks on any current tag then it will display on the current tag name. {% for tag in product.tags %} {% if current_tags contains tag %} <a class="link" href="/collections/{{ collection.handle }}">{{ tag | link_to_tag: tag }}</a> {% else %} <a class="link" href="/collections/{{ collection.handle }}">{{ product.tags[0] | link_to_tag: tag }}</a> {% endif %} {%

Shopify API: Get Orders In Shopify by Date

≯℡__Kan透↙ 提交于 2019-12-11 14:51:55
问题 Why fetching Orders from Shopify Store by date and limits always returns the orders of latest date? like: if I make a query for getting 5 orders from 1 august 2012 using this query: /admin/orders.json?status=open&created_at_min=2012-08-01 12:00&limit=5 As I have 5 orders in 20 August 2012 and 5 orders in 31 August 2012 but this will returns 5 orders of latest date (31 August 2012). 回答1: The Shopify API returns orders from Most Recent to Oldest. When you submit your query Shopify will first

Shopify (liquid): Find number of days between two dates

随声附和 提交于 2019-12-11 13:31:16
问题 I am new to Shopify and .liquid files syntax. I can get two dates currently: {% assign product_created_date = product.created_at | date: "%a, %b %d, %y" %} {% assign current_date = 'now' | date: "%a, %b %d, %y" %} which gives me the current date and also the date when the product was created. I want to show the users in the theme, the date since the product was posted. I've read some liquid filters and did some search but couldn't find out exactly how I would find the days since product was

Shopify - creating session for private app

会有一股神秘感。 提交于 2019-12-11 09:41:58
问题 I am trying to create an app using RoR so I can test the ShopifyAPI. I am using a private App I created via the partner admin portal. I tried to create a session using the password generated. The session seems to be valid. login_controller: def index debugger sess = ShopifyAPI::Session.new('a75999989b7715f73ae5273497b9bfcb:9eb9f578d9fcfd753713e079@mante-hudson7934.myshopify.com', '9eb9f578d9fcfd753713e0795') sess.valid? session[:shopify] = sess flash[:notice] = "Logged in" redirect_to return

How is the asset URL generated for the Shopify CDN?

守給你的承諾、 提交于 2019-12-11 09:06:22
问题 Assume I have an image uploaded to a store on Shopify called 'logo.png'. In a liquid template I can generate a URL for it like this: {{ 'logo.png' | asset_url }} This generates a URL such as: http://static.shopify.com/s/files/1/0072/7952/t/2/assets/logo.png?100239 I want to generate this URL outside of Shopify for use in a third party app. From the Shopify code at https://github.com/Shopify/pixelprinter/blob/master/app/liquid/filters/shop_filter.rb#L84 I can see how to use the shop id to

How are Shopify API order collections sorted when passing in an updated_at filter

ⅰ亾dé卋堺 提交于 2019-12-11 08:12:11
问题 This question is very closely related to Sort Order of Shopify REST Collections but the answer for that question was specific to the since_id parameter. My question is what is the expected sort order for order collections over the API when updated_at_min or updated_at_max are provided? What would be ideal would be to be able to get results in ascending order one way or another, but without having to pass in since_id , because we want to be able to pull in new data on orders on an ongoing

Capture shopify payment response

99封情书 提交于 2019-12-11 05:56:33
问题 I recently started implementing shopify for one of my client. Since it's a website built in spring, I have only option to use their Javascript SDK . Everything is working fine I'm able to create a cart increase the number of product but once I redirected user to the shopify payment page I'm not able to track the payment status. I tried to google this issue from last couple of days but I'm not able to figure out how to resolve this. Can anyone help me with their experience what I'm doing wrong