shopify

uninitialized constant ShopifyAPI::CustomerGroup::Customers error

梦想的初衷 提交于 2020-01-06 06:58:36
问题 No doubt I am doing something wrong here, but I am following instructions on a new commit from here. I am getting the following error uninitialized constant ShopifyAPI::CustomerGroup::Customers 00:33:56 web.1 | /Users/matt/.rvm/gems/ruby-1.9.3-p0/gems/shopify_api-3.0.3/lib/shopify_api/resources/customer_group.rb:4:in `customers'' When running this code group = ShopifyAPI::CustomerGroup.find(5614012) customers = group.customers Here is the gem file mentioned above 回答1: Version 3.0.3 should

Shopify API call using AJAX and JSP

不羁岁月 提交于 2020-01-05 11:48:48
问题 I am developing a Java Web Application using JSP, Servlet and AJAX. In which I try to get details of product by specific Id. When I run it on eclipse it displays the following message: "This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?" When I press ok, it shows the product details. If I browse in Google chrome it does not show any details. I get the response of 0 from Shopify. Here is my ajax code which I am using to get

How do I update a variant price using shopify gem in rails 3.2.2?

陌路散爱 提交于 2020-01-05 09:14:08
问题 Rails 3.2.2 app, using the most recent shopify gem on github. I've looked at other threads on the shopify google group that suggested switching ShopifyAPI::Base to use xml, but that had no effect. Simple script, updates a product's variant prices. This used to work, not sure when it stopped working, but script is identical to the old working version. Essentially, if I set a variant price and compare_at_price, and then save, shopify does not reflect a change. The method returns true, however.

Shopify JSON array returning results but some empty results

北战南征 提交于 2020-01-05 05:01:41
问题 I am wanting to pull back only results that are available but it is returning in the json response null,null,null,result, result for example. Here is the code: {% capture results %} {% for item in search.results %} {% assign product = item %} {% if product.available == true %} { "title" : {{ product.title | json }}, "url" : {{ product.url | within: product.collections.last | json }}, "thumbnail": {{ product.featured_image.src | product_img_url: 'thumb' | json }}, "available": {{ product

Webhooks and delayed_job in a Rails shopify app

空扰寡人 提交于 2020-01-04 09:04:02
问题 Hi I'm trying to add webhooks to my shopify app created using the shopify gem. Until now everything works. In my webhook_controller I have a before filter that connects to the store: before_filter :connect_to_store def product_new data = ActiveSupport::JSON.decode(request.body.read) shopify_id = data["id"] Product.new_from_shopify(@s, shopify_id) head :ok end private def connect_to_store shop_url = request.headers['HTTP_X_SHOPIFY_SHOP_DOMAIN'] shop_url = ("http://" + shop_url) @s = Shop.find

How to efficiently update many ShopifyAPI::Product instances using ShopifyAPI (Ruby on Rails)?

前提是你 提交于 2020-01-04 05:27:13
问题 I am writing an app which will sit between a vendors proprietary inventory management system and their Shopify shop. The app will periodically update Shopify from new data generated by the inventory management system. It will also provide end-points for Shopify webhooks. I am currently doing something like this (pseudo-ruby with much stuff omitted): def update_product_with_proxy(product_proxy) product_proxy.variant_proxies.dirty.each do |variant_proxy| update_variant_with_proxy(variant_proxy)

Show All Color Variants on Collection page in Shopify using Brooklyn Theme

余生颓废 提交于 2020-01-03 16:53:11
问题 Hey i am using brooklyn theme in my shopify website. I have different products will color variants . When i click on collection page i want to show all color variants of that products as separate products. I am googling since last night any help please. 回答1: Look at the codes below. <ul class="colorlist"> {% for option in product.options %} {% if option == 'Color' %} {% assign index = forloop.index0 %} {% assign colorlist = '' %} {% assign color = '' %} {% for variant in product.variants %} {

Shopify: Using variables from {% schema %} in Javascript

旧街凉风 提交于 2020-01-03 06:02:26
问题 I have a custom section that uses the following schema: {% schema %} { "name": "Custom", "settings": [ { "type": "textarea", "id": "custom_text_product", "label": "Insert name of the product here", "default": "Product" }, { "type": "textarea", "id": "custom_text_msg", "label": "Custom text", "default": "Insert text here" } ] } {% endschema %} Basically what I want is to get the text from each textarea, manipulate via Javascript and then add it to the DOM. Via .liquid I would simply do {{

Shopify update cart.item_count using AJAX

戏子无情 提交于 2020-01-03 05:24:10
问题 On the product detail page of my Shopify site when you click " Add To Cart " the page uses AJAX to do its thing. BUT there is a variable named cart.item_count that does not update unless the page refreshes. Question: How to get AJAX to update the cart.item_count on that page. Below is the code for the HTML page: <div id="mini-cart" > <span class="cart_count_info">Cart ({{ cart.item_count }})</span>//THIS SPAN IS WHAT NEEDS TO BE UPDATED </div> <p id="add-to-cart-msg"></p> //THIS "P" IS

Shopify API Cross Domain Ajax Request

你离开我真会死。 提交于 2020-01-03 04:10:16
问题 I am using the below code to get the customer details from shopify. I have redirected my domain to the other domain from the shopify admin. function setEmailWithLoggedInUser(callback) { $.ajax({ url: 'https://new-website-shopify.myshopify.com/admin/customers/'+__st.cid+'.json', crossDomain: true, beforeSend: function(xhr) { xhr.setRequestHeader("Authorization", "Basic XXXXXXXXXXXX") }, success: function(data){ console.log(data); if(callback) callback(); } }) I have done a lot of work around