shopify

Using Font Awesome library in a Shopify store

余生颓废 提交于 2019-12-07 06:40:07
问题 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

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

风格不统一 提交于 2019-12-06 23:07:24
问题 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. $

Setting Content-Type in Django HttpResponse object for Shopify App

↘锁芯ラ 提交于 2019-12-06 16:55:35
问题 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

How to handle Shopify API connection with Shopify gem?

孤者浪人 提交于 2019-12-06 16:02:16
Hi I'm using the Shopify gem in my Shopify app and I'm looking for suggestions on how to handle the API connection to Shopify. I'm using webhooks and delayed_jobs so I need a way to open the connection outside of the controller. At the moment I added this method to my Shop model: def connect_to_store session = ShopifyAPI::Session.new(self.url, self.access_token) session.valid? ShopifyAPI::Base.activate_session(session) end So I can open the connection very easily, for example: Shop.find(1).connect_to_store ShopifyAPI::Shop.current.name The problem is that, inside my Product module, I need the

How to develop rails app for shopify with ScriptTags

只愿长相守 提交于 2019-12-06 13:42:35
I have a shopify app deployed in Heroku, developed in Rails. I need call a javascript function from any shopify store's frontend. I've read this article ( http://www.shopify.com/technology/3033852-shopify-api-update-scripttags-javascript-insertion ), but I don't understand it... Where do I have to put this code: HTTP POST http://their-shop.myshopify.com/admin/scripttags <?xml version="1.0" encoding="UTF-8"?> <script-tag> <src>http://example.com/your-awesome-script.js</src> <event>onload</event> </script-tag> What should be the src tag (for my deployed rails app), and where should I put the

Shopify liquid get related blog posts

99封情书 提交于 2019-12-06 13:37:27
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 array and testing if it is empty, but I am having difficulty finding out how this is done. Thanks! Try

XML parser using shopify webhooked line-items

℡╲_俬逩灬. 提交于 2019-12-06 13:36:05
I am using shopify webhook to update my sql server's 'qty' field when order updated, below is my php code ?php $xmlData = fopen('php://input' , 'rb'); while (!feof($xmlData)) { $xmlString .= fread($xmlData, 4096); } fclose($xmlData); $xml = new SimplexmlElement($xmlString); file_put_contents('orders/order' . '.xml', $xmlString); $dom = new DomDocument(); $dom->load('orders/order.xml'); $itemList = $dom->getElementsByTagName('line-item'); foreach($itemList as $item) { $sku=''; $qty=''; foreach($item->childNodes as $child) { if ($child->localName == 'sku') { $sku = $child->textContent; } if (

Adding 20% to product price via Javascript in Shopify

若如初见. 提交于 2019-12-06 11:54:33
问题 There is probably a simple answer to this that someone can help me with but I'm not that great with Javascript. Basically in Shopify I've set up prices to be displayed +20% with one of their liquid tags. This works great apart from on the product page because there is a bit of Javascript that disables the add to cart button if a size is out of stock and changes the price to out of stock too. Anyway here is the code: <script> var selectCallback = function(variant, selector) { if (variant &&

Write custom search app in shopify

别来无恙 提交于 2019-12-06 09:37:51
I need to implement our own custom product search in Shopify, but I have been unable to find out how exactly to do this. I am not talking about the template which shows the search result, but we need to write custom code to decide exactly which products should be shown on the search page, and their order. I can see there are a lot of apps out there which provides a custom search result/order so I guess it is possible to do, I was just unable to find any documentation about it. I already have all the data needed to produce the desired search result, so my only problem is how to integrate with

Custom fields for Shopify User Registration Form

对着背影说爱祢 提交于 2019-12-06 06:51:37
问题 I can't find any documentation on how to add custom fields for the user registration forum so I tried something but didn't work: <div class="single-full-width customer"> <div class="login"> {% form 'create_customer' %} {% if form.errors %} {% for field in form.errors %} <p class="input-error-wrapper"><span>{{field}} {{ form.errors.messages[field] }}</span></p> {% endfor %} {% endif %} <p> <label>First Name:</label> <input type="text" value="" name="customer[first_name]" class="input-text-1" /