shopify

How to use the Rails shopify_app gem with a private API key?

被刻印的时光 ゝ 提交于 2019-12-06 05:14:40
I am trying to use the Rails *shopify_app* gem with a private API key. The documentation for the gem mentions that it's possible to do this but doesn't say how. The instructions are only for a Shopify Partner Account. For a private api key there seems to be no way of specifying the return url . This results in the following response fragment being sent back: {"error":"invalid_request","error_description":"The redirect_uri and application url must have matching hosts"} I've looked around a bit but was not able to find a solution to this. It seems like this should be better documented on Shopify

Update/Remove cart attributes in Shopify

巧了我就是萌 提交于 2019-12-06 02:57:47
问题 I am using cart attributes to add extra information for each product to the cart (from the product page). I am specifically using cart attributes over line item properties because the client needs to be able to edit this information in the order later on which line item properties don't allow . Adding the information works just fine, the problem comes in when a customer decides to remove an item from the cart because although the item is removed, the cart attribute remains since it is not

how can my app modify the shop's template files

霸气de小男生 提交于 2019-12-06 00:36:37
I need to inject liquid markup to the store's theme templates when my app is installed. I know there are ScriptTags, but they load scripts. And I know that the scripts can change the page's DOM. but I need to install my liquid to the product details pages. is it possible? I would add your Liquid as a new snippet asset. The merchant can then be instructed to paste a Liquid include statement you provide them in their product Liquid scripts. That is fairly clean. Otherwise, your App could download their product Liquid script, edit it, and then add it to the shop as an alternative template. You

Script Tags in shopify checkout

拜拜、爱过 提交于 2019-12-06 00:32:18
问题 I'm looking at developing an app for Shopify which will add functionality to a store's checkout page. It would be ideal if the user didn't have to copy and paste code into files themselves hence I was looking at using the ScriptTag API ( http://api.shopify.com/scripttag.html ) to include a custom javascript file. I've worked through some of the examples on the aforementioned API page and can get a custom script included on every page on my test store except for the checkout page. I've changed

Overcome limit of 50 in for loop in shopify

北战南征 提交于 2019-12-05 11:02:29
I have paginated a product list over a limit of 50 to fit in the whole page ( index.liquid ). But the if condition within for loop doesn't apply over whole paginated items as for loop is limited to 50 items. Any help would be appreciated. <td class="collection-reviews"> {% paginate collections.all.products by 1000 %} {% for product in collections.all.products %} {%if product.metafields.spr.reviews %} <div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div> {%endif%} {% endfor %} {%endpaginate%} </td> No, you cannot overcome it, You can query up to

Using Font Awesome library in a Shopify store

蓝咒 提交于 2019-12-05 10:56:06
I'm trying to use Font Awesome: http://fortawesome.github.com/Font-Awesome/ I've used these font icons on several Rails projects with no problem but for some reason when I try to use them in a Shopify store they don't get rendered. I'm using another @font-face with no difficulties but for some reason this @font-face is not rendering. In assets/ I have: fontawesome-webfont.eot fontawesome-webfont.svg fontawesome-webfont.ttf fontawesome-webfont.woff And I load them with @font-face just like I do with another font-face that works fine. in my stylesheet.css which lives in assets/ @font-face { font

AJAX a form submission with Rails 3.2

喜欢而已 提交于 2019-12-05 08:07:05
问题 This is my form, and it works fine, but now I want to AJAX it. <%= form_tag variant_path(variant.id), :method => :put, :class => 'update_inv_form' do %> <%= text_field_tag :inventory_quantity, variant.inventory_quantity %> <%= submit_tag 'Update' %> <% end %> When I add the :remote => true attribute the form successfully submits via AJAX (I can see it happening on the server and I can see the changes when I refresh the page). I want to update the view properly to show the changes without

Color Swatch / Variant dropdown list for shopify products

时光毁灭记忆、已成空白 提交于 2019-12-05 03:26:24
问题 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

Shopify + Ubuntu 12.04LTS + Faraday issue = OK to use older OpenSSL?

怎甘沉沦 提交于 2019-12-05 03:22:00
I'm using Ubuntu 12.04LTS Desktop to develop a Shopify App (using the shopify_app gem), and I ran into this problem when processing the callback URL. Faraday::Error::ConnectionFailed (Connection reset by peer - SSL_connect) Looking at the shopify-app-discuss group here and here, it seems that the problem is with Ubuntu 12.04 and its OpenSSL. I tried to install the most up-to-date OpenSSL, but nothing. One alternative that I found was to use a different, older OpenSSL, one that RVM provides. $ rvm remove 1.9.3 (or whatever version of ruby you are using) $ rvm pkg install openssl $ rvm install 1

Setting Content-Type in Django HttpResponse object for Shopify App

流过昼夜 提交于 2019-12-04 23:59:52
I'm working on a Shopify app using Django, which I am hosting on a VPS with nginx and gunicorn. I am trying to change the Content-Type of an HttpResponse object to application/liquid , so that I can use Shopify's application proxy feature , but it doesn't appear to be working. Here is what I believe to be the relevant section of my code: from django.shortcuts import render_to_response, render from django.http import HttpResponse from django.template import RequestContext import shopify from shopify_app.decorators import shop_login_required def featured(request): response = HttpResponse()