shopify

How do I update properties on a shopify line_item

独自空忆成欢 提交于 2019-12-10 03:14:14
问题 How do I update the properties for a specific line_item using the shopify api? There does not seem to be a method to directly update a specific line item. I then tried to update the entire order object instead, but it seems like it is not saving my properties. If I save the order with the following json, the api returns the full order object, but with an empty properties [] line for my line_items. {"order":{"id":94202342,"line_items":[{"id":615546756,"variant_id":627937216,"properties":[{"my

How do i enable a third party payment gateway (not supported today by Shopify)

淺唱寂寞╮ 提交于 2019-12-09 18:47:49
问题 In india, Shopify supports the following payment gateways: Citrus Payment Direc Pay PayU India PayU Paisa But we have an existing merchant account with Axis Bank. I have no idea where to configure my Axis Bank Payment Gateway with Shopify. So the question is: How do i configure my Axis Bank Payment Gateway with Shopify? Is it even possible to add other payment gateways, which asre not yet supported (not listed in their store admin panel) by Shopify? 回答1: You can write a connector for that

Can Shopify app automatically inject liquid code inside shop's theme?

瘦欲@ 提交于 2019-12-09 15:46:04
问题 I'm building a Shopify application and I'm interested in automatically adding a liquid content into the shop's theme. 回答1: A file with a .liquid extension is considered to be an asset. Since you can add assets to a shop, the answer is yes, you can indeed inject Liquid template code into a shop's theme. If you use an App Proxy you can also send Shopify Liquid strings and Shopify will render that right in the Shop for you. Pretty neat stuff. 来源: https://stackoverflow.com/questions/13932861/can

Howto check if current visitor is shop's admin?

∥☆過路亽.° 提交于 2019-12-09 03:32:47
问题 I would like to create a product that would be available in Shopify's storefront but would only be accessible for the shop administrator. Is there anyway to identify if the current user is an admin via liquid? or is there any other solution for this challenge. Thanks! 回答1: If you're signed in as an admin, when rendering the {{ content_for_header }} include, it will contain some JavaScript to push the page content down to make room for the Shopify admin bar. We can utilize capture to store the

Shopify Tags total items

五迷三道 提交于 2019-12-09 03:23:22
问题 In Shopify, how do I show a list of tags followed by the number of products with that tag? Example: Black(12), Blue(10). Currently the code looks like this, but it doesn't work. <ul> {% for tag in collection.all_tags %} <li> <a href="https://mystore.myshopify.com/collections/all/{{ tag }}"> {{ tag }} </a> ({{ tag.products_count }}) </li> {% endfor %} </ul> 回答1: products_count is an attribute of collection, not tag . I believe you would need to manually loop through the products and count the

Escaping Characters in Liquid String

断了今生、忘了曾经 提交于 2019-12-08 19:34:21
问题 I am trying to put together a tag list that contains various sizes (in Shopify using Liquid). The sizes use single and double quotes for inches and feet. Because it uses both, it is causing issues with the string closing properly. I have tried using a standard escape character '\', but that doesn't seem to work. Is it possible to escape characters in Liquid or is there another method someone can recommend? {% assign tags = "4'x6', 5'x8', 8'x10', 9'x12', 10'x14', 5'x7', 3'x5', 2'x3', 6'x9', 16

what's the difference between .js and .js.liquid in shopify?

一曲冷凌霜 提交于 2019-12-08 19:16:23
问题 In the assets section, there are files with .js and .js.liquid names. What is the difference between the 2, which one should I use if I want to include a js file into a theme? This is inside a .js.liquid file right now. I would like to construct a string made up of liquid variable. when I append this string inside a DOM element, it doesn't seem to show up. var someString = ''; {%for line in order.line_items%} someString += 'q='+{{line.quantity}}+'&p='+{{line.product.id}}+'&pp='+{{line.price}}

Postmates integration with Shopify Shipping/Carrier services

两盒软妹~` 提交于 2019-12-08 14:50:28
so we are looking to integrate this application: https://postmates.com/developer/docs into our Shopify platform. For how it works please check: http://blog.postmates.com/post/104856343907/a-technical-perspective-on-the-postmates-api . So we are looking for add a Carrier Service to our store. And As Postmates provides services to few regions as follows we will add other mutiple shipping options for non-Postmates supported regions. Postmates is currently available in the San Francisco Bay Area (San Francisco, East Bay, South Bay), New York City, Chicago, Los Angeles, Washington DC, Seattle,

How to share cached apollo-client data with another query

北城以北 提交于 2019-12-08 11:56:27
问题 I'm using apollo-client@2.3.x (& react-apollo@2.1.x ), with the standard InMemoryCache , to query a Shopify store via their GraphQL Storefront API. I have two queries: 1. getProducts (in <Home /> ), and 2. getProduct($id) (in <ProductDetail /> ). In the scenario starts on <Home /> , then clicks on a product, I'd like the <ProductDetail /> component to show the cached response from query 1 before query 2 runs. Demo: https://shopify-storefront-example-rdfwtslzng.now.sh/ Source: https://shopify

How to async or defer JS in Liquid?

不羁的心 提交于 2019-12-08 09:48:36
问题 I'm trying to improve site speed, and one thing that might be delaying render are these scripts: {{ '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js' | script_tag }} {{ 'jGestures.min.js' | asset_url | script_tag }} {{ 'modernizr.min.js' | asset_url | script_tag }} How can they be made to asych or defer? Or should I simply move them to the bottom? Also I have not made changes like this to my theme yet. Is it easy to revert changes in Shopify? I would just change it to the way it