shopify

Shopify API Variant not being returned with product_id attribute

孤人 提交于 2019-12-11 05:30:02
问题 So I'm using the Shopify Gem to access the Shopify API and noticed that the product_id attribute is not being returned within the response body for a simple ShopifyAPI::Variant.find call. 1.9.3p194> ShopifyAPI::Variant.find(209901733) => #<ShopifyAPI::Variant:0x007fbf7225d3f0 @attributes={"barcode"=>nil, "compare_at_price"=>"198.00", "created_at"=>"2012-03-23T14:11:39+11:00", "fulfillment_service"=>"manual", "grams"=>1000, "id"=>209901733, "inventory_management"=>"shopify", "inventory_policy"

Can not update the Variant Price using the ShopifyAPI

孤者浪人 提交于 2019-12-11 03:55:26
问题 I am facing a problem - can not update the price of the variant using the ShopifyAPI.. while updating the price of the variant, it is giving the error @remote_errors=#<\ActiveResource::ResourceInvalid: Failed. Response code = 422. Response message = Unprocessable Entity.>, @validation_context=nil, @errors=#<\ActiveResource::Errors:0x000000029eb1d0 ...>>, @messages={:base=>["Options are not unique"]} '\' after '<' is required to show the error, otherwise stack overflow is hiding the error. as

When GETting a list of products via Shopify API, how does pagination work on the server side?

久未见 提交于 2019-12-11 03:28:55
问题 Scenario: Store with 1000 products; need to download them all. Requests for products are limited to a maximum of 250 products per call, and apparently the API may or may not return the "limit" requested. For example, a call with limit=250 may return less than 250 items, from what I've observed. So, to get 1000 products a minimum of 4 calls are needed. The following requests are issued: #1 GET /admin/products.xml?limit=250&page=1 (returned the first 250 products 1-250) #2 GET /admin/products

How to add Shopify development app to development store

混江龙づ霸主 提交于 2019-12-11 03:07:49
问题 I've done the following: Created a partner account Created a dev store Created an app. But I can't seem to find a way to add my app to my dev store. Can someone please explain how I can add it to my dev store without putting it in the app store? 回答1: The app needs to be authorized with oAuth before it can become part of the development store. Details here. 来源: https://stackoverflow.com/questions/17576180/how-to-add-shopify-development-app-to-development-store

Shopify authentication using the google app script Class OAuthConfig

你说的曾经没有我的故事 提交于 2019-12-11 02:58:18
问题 I am trying to connect with my shopify shop through the google javascrip. The schema for authentication should be something similar to the one you can find on google documentation for twitter. I'am trying the following code, but I always get the error:{"errors":"[API] Invalid API key or access token (unrecognized login or wrong password)"} function getInfofromshopify() { var handle = "01-02-0316_cmt_utensili" var urljson ="https://mysitename.myshopify.com/admin/products.json?handle="+handle;

Shopify API CARTS - Changing line_item line_price for price Override

試著忘記壹切 提交于 2019-12-11 02:56:39
问题 Shopify has a CARTS api but it is read-only. I am trying to find a way to manipulate the line_item's line_price or price attribute. Shopify support has directed me here for an answer. Since there is no proper documentation on this any help would be appreciated. 回答1: Products have variants, and a line item has a product ID and a variant ID. A line item has a price too. And no matter how you access that item (using the Ajax API or the backend API) you cannot manipulate the price. If you want to

Limits on Shopify metafields

我与影子孤独终老i 提交于 2019-12-10 22:20:53
问题 I was wondering what the limits were on the number of metafields that an entity in Shopify could have. For instance, under a given namespace for a product object, could you have 1000 unique key value pairs? Is there a hard limit? Please note I have consulted the documentation on Shopify's Metafield API page (http://api.shopify.com/metafield.html) but it only states the following limits: The namespace has a maximum of 20 characters, and the key has a maximum of 30 characters. Thanks for help!

Shopify: Why does Liquid sometimes use {%- instead of {%?

守給你的承諾、 提交于 2019-12-10 19:45:46
问题 I've been looking through the code of the default theme, and I've noticed that sometimes they use the {% tag to indicate Liquid code (as per the documentation), but other times they use {%- . For example: {% case section.settings.image_size %} {% when 'small' %} {%- assign product_image_width = 'medium-up--one-third' -%} {%- assign product_description_width = 'medium-up--two-thirds' -%} I cannot find a single example of {%- in the Liquid documentation, either on the Shopify site, or on GitHub

how to display a meta field on product detail page in shopify?

房东的猫 提交于 2019-12-10 17:56:36
问题 i have a created meta filed using the shopify API call like this: 'POST', '/admin/products/1328/metafields.json', array("metafield" => array('namespace'=>'inventory', 'key'=>'warehouse', 'value'=>"some text here", 'value_type'=>'string'))); But now I want to show this on product detail page how can I achieve this? Or where it will be displayed on the product detail page in Shopify. Can anyone (who has a eCommerce shop on any other system but not on shopify) can see these meta fields? 回答1: {%

Shopify liquid get related blog posts

喜夏-厌秋 提交于 2019-12-10 10:48:23
问题 In shopify I am using liquid templating to get blog posts which are related to products by their tags, like so: <ul> {% for article in blogs.blog.articles %} {% if article.tags contains product.handle %} <li><a href="{{ article.url }}"><p>{{ article.title }}</p></a></li> {% endif %} {% endfor %} </ul> However, if there are no related posts, I would like to display a message such as "No related posts!" My question is how would I do that? I have contemplated trying to get the articles into an