shopify

Importing Node Modules With JavaScript

廉价感情. 提交于 2019-12-20 01:49:11
问题 I apologize for the simple question, but I'm pretty new to web development and JavaScript. I want to import a package I've installed using npm, specifically shopify-buy following the guide here: https://shopify.github.io/js-buy-sdk/ The package is in my node_modules folder and I'm trying to import it into a JavaScript document using import Client from 'shopify-buy'; When I try to load everything up in Chrome, I get an error on the import line Uncaught SyntaxError: Unexpected identifier The

Date Math / Manipulation in Liquid Template Filter

北战南征 提交于 2019-12-18 12:49:23
问题 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

Shopify sync cart with customer

泪湿孤枕 提交于 2019-12-18 09:36:16
问题 [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

Error: getaddrinfo EAI_AGAIN

落花浮王杯 提交于 2019-12-17 02:49:10
问题 My server threw this today, which is a nodejs error I've never seen before. Error: getaddrinfo EAI_AGAIN my-store.myshopify.com:443 at Object.exports._errnoException (util.js:870:11) at errnoException (dns.js:32:15) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:26) I'm wondering if this is related to the DynDns DDOS attack which affected Shopify and many other services today. Here's an article about that. My main question is what does dns.js do? What part of node is it apart of? I

Shopify Delivery Date Picker - turn off days

岁酱吖の 提交于 2019-12-14 03:14:40
问题 I added this code to my shopify site http://docs.shopify.com/manual/configuration/store-customization/page-specific/cart-page/capture-delivery-date. It works great, but I can't figure out how to turn off some days. I don't deliver overnight or even 2 day, so I want to disable the ability for customers to choose days that are today's date + the following 7 days. 回答1: You can adjust the min and max dates in your delivery-date.liquid snippet. To set the minimum date to today's date + 7 days

Using Shopify API in different Controller

我们两清 提交于 2019-12-13 19:12:19
问题 I need to get the current shop's domain (I do this using ShopifyAPI::Shop.current.domain ). This works in the HomeController and can display it in home/index.html.erb . But, when I try to call ShopifyAPI::Shop.current.domain in my CustomController to display in a different view, I get the error Missing site URI . I think this is because once the user leaves the home/index view it no longer has access to that Shop instance. So, how can I recreate that instance in my CustomController if I don't

How to Display a Metafield in Shopify

别等时光非礼了梦想. 提交于 2019-12-13 15:52:00
问题 We have a group of products that we want to have FREE Shipping. In order to do so, I have made their weight =0 and created a weight based shipping for 0lbs. That way the shipping passes through the cart. But...I would like to display the actual weight on the product page. I have created a metafield for the shipping weight, and I am trying to call that value to the product page, but not having any luck...... Here is what I am trying for code.... //------SHIPPING WEIGHT-------------------------

How to use the Shopify API to change the payment status of orders?

一曲冷凌霜 提交于 2019-12-13 13:43:14
问题 I'm building an iOS app for my own Shopify store. I created a private app and using the API key and password to call APIs with the format: https://apikey:password@hostname/admin/resource.json Problem occurs when I try to use the API to make the payment status change for orders. (I can create a new order without problem). I don't find any API for changing the financial status of an order. I cannot change the financial status by modifying an order or I even cannot make any transaction by API no

How to delete Shopify Webhooks made thru Shopify API?

烂漫一生 提交于 2019-12-13 13:28:24
问题 I'm having trouble deleting Webhooks that I created thru the Shopify API. To create the webhook, I used this code in RoR: webhook = ShopifyAPI::Webhook.create(format: "json", topic: "orders/create", address: "some address") I'm able to send a GET request and retrieve all the webhooks that were created. But when I send the DELETE request with the respective ID, the response is "404 Not Found - errors: Not found". I'm sending the DELETE request using Firefox's RESTClient, and the format is like

Enabling Liquid templating syntax highlight in webStorm/phpStorm

旧时模样 提交于 2019-12-13 11:32:27
问题 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