shopify

Variable within liquid if statement when calling shopify settings

大城市里の小女人 提交于 2019-11-30 17:31:05
问题 I thought this would be simple to solve but I am trying to put a variable within a liquid statement. I have my variable {{ loop_index }} and I want it to be within this statement : {% if settings.dropdown-[loop_index]-select %} I tried putting [...] round it but that didn't work. Basically it should say settings.dropdown-1-select, settings.dropdown-2-select. What am I doing wrong? 回答1: Create a string containing the variable name, then use the square bracket notation to access the setting

SSL_connect error when accessing Shopify API with rubygem

穿精又带淫゛_ 提交于 2019-11-30 17:01:36
问题 I'm having trouble accessing the Shopify API using the shopify_api gem. Here's what happens: >> require "shopify_api" #=> false >> ShopifyAPI::Base.site = "https://username:secret@mysite.myshopify.com/admin" => "https://username:secret@mysite.myshopify.com/admin" >> products = ShopifyAPI::Product.find(:all) Errno::ECONNRESET: Connection reset by peer - SSL_connect from /Users/zubin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:799:in `connect' from /Users/zubin/.rvm/rubies/ruby-1.9.3

Date Math / Manipulation in Liquid Template Filter

限于喜欢 提交于 2019-11-30 08:22:16
I'm constructing an "Integration URL" in Desk.com, which uses the Shopify Liquid Template filter syntax. This URL needs to contain a "start date" and an "end date" for a query where the start date is 7 days ago and the end date is right now. To achieve this I think I need to subtract 7 days (604800 in Epoch time) from the 'now' object and then apply my formatting but I can't figure out valid syntax for that. For the current time, this syntax is valid and working: {{'now' | date: "%b %d, %Y %I:%M %p -0500" | uri_encode | replace:"+","%20"}} For 7 days ago, here's the best I could come up with

Enabling Liquid templating syntax highlight in webStorm/phpStorm

≡放荡痞女 提交于 2019-11-29 21:03:36
I wonder if someone managed to enable the Liquid templating engine syntax highlighting in WebStorm IDE , I work a lot on Shopify stores and really like using Webstorm for that purpose. Did anyone managed to get this working? I found some resources regarding this issue on JetBrain's forum though it didn't quite got me anywhere, there is one dude who suggested using ' tmBundle ' and that might work if you do some dark magic. The thread is: RUBY-7210 and the official plugin request: JetBrain's plugins: Liquid Templating language request Ilia luk I've found out that Twig have a very similar syntax

Shopify sync cart with customer

不羁岁月 提交于 2019-11-29 16:59:24
[self.client loginCustomerWithCredentials:credentials callback:^(BUYCustomer * customer, BUYCustomerToken * token, NSError * _Nullable error) { if (customer && !error) { self.appDelegate.cart = [self.client.modelManager insertCartWithJSONDictionary:nil]; NSLog(@"Success fully loged in token %@ %@",token.accessToken,token.customerID); UINavigationController *navigationController = self.navigationController; [navigationController popViewControllerAnimated:YES]; }else{ [self showEror:@"LogIn Failed" message:@"Please provide valid Details"]; } }]; In the above code after a successful login I try

Shopify API: Create a Promotion?

老子叫甜甜 提交于 2019-11-29 03:52:27
Using the Shopify API, is there a way to creation promotions for your store? If not, is there a way to programmatically create promotions in Shopify? (short of using CURL posts to the admin) That is, I can create a promotion by hand using the admin and navigating to the Promotions and clicking the Add a discount code link. I'd like to be able to do the same thing programmatically, or to know for certain this isn't possible. I don't see any obvious method on the api list , but it seems like something should be an API method. Unfortunately they don't allow it... I resorted to creating an

Adding custom CSS and JS to Shopify

。_饼干妹妹 提交于 2019-11-29 00:07:16
问题 I am working on getting vertical tabs for a page on Shopify, using the 'Atlantic' theme. As this theme does not have vertical tabs by default, I have used the external JS and CSS "jquery-jvert-tabs". My question is, if I upload the JS and CSS files as assets, how do I link them to the page on which I want to use these and how to make use of these on the page after that, if I have certain style elements available there too? 回答1: Simply upload your filename.js file in the assets folder. then

How to develop Shopify themes locally?

ぐ巨炮叔叔 提交于 2019-11-28 23:44:27
I'm going to work on a Shopify theme, and I want to figure out how to run/edit it locally. I'd like to be able to the following, if possible: Pull all the Shopify theme code from the site to my local computer (ideally a single command line tool) Make edits locally, and run them locally or in a staging environment Push all the edits to the main Shopify site, again using a command line tool Is this at all possible? There are quite a few workflows you can use here. 0. Shopify Slate (new!) Slate is a theme scaffold and command line tool for developing Shopify themes. It is designed to assist your

Convert string to integer in Shopify Liquid?

二次信任 提交于 2019-11-28 18:14:49
I just read this related answer: How can I convert a number to a string? - Shopify Design — Ecommerce University To convert a string to a number just add 0 to the variable: {% assign variablename = variablename | plus:0 %} Not super elegant but it works! Inelegant or not, the answer given there isn't working for me. What's the right way to do this? Are the Liquid docs really missing such basic answers or am I just not finding the right place to look? Using assign with a math filter is correct. See this thread on GitHub , and this blog post . Variables created through {% capture %} are strings

Shopify customize order export csv file

倖福魔咒の 提交于 2019-11-28 08:56:16
问题 I am trying to create a custom order export csv file from Shopify . I want customer id to be included in shopify-exported-csv-file for order. Can I customize shopify csv export ? 回答1: Not Possible . I had a discussion with Shopify support and they said it is a good feature for future. But right now, you can't customize the export of csv in Shopify . 回答2: You sure can! I do it in my App. I add two missing columns from the order export CSV Shopify produces. I add in the cost price of the item