Questions tagged [shopify]

1

votes
1

answer
994

Views

Shopify API getting order by name or order_number

Im using a plugin for CakePHP to make the calls to obtain certain orders. I can call all orders with certain fields, but I was wondering how would I have to make the call to get the orders with a certain name or order_number? Here is the source for the call to Shopify. Its already authenticated and...
Jurgen Feuchter
1

votes
1

answer
2.1k

Views

PHP REST post with Shopify API

I have a shopify store and would like to add approximately 200 orders using the Shopify API https://help.shopify.com/api/reference/order#create I've never used PHP before but have put together the below script from previous questions and using the API example data and using a product from my store (...
Shauno_88
3

votes
0

answer
37

Views

how to create public app in shopify and provide app url and whitelisted url in php

I have created public app and set app url which is in laravel where I am getting timestamp,shop and hmac. In whitelisted url I am putting url like https://www.example.net/get-access-token which is also in laravel. How to connect client (which will install the app) to my public app? How the payment p...
Deepika Gupta
0

votes
0

answer
6

Views

Shopify shipping method - 3rd party Click and collect

I am trying to integrate a 3rd party shipping widget on Shopify Plus. The company we're using, ParcelPoint, do not have an app available in Shopify and so I am using their API & widget. If a customer selects this as their shipping method, they can then select an address from their widget. I am stor...
kaygee
1

votes
0

answer
8

Views

Modify theme.liquid using Shopify assets API

I want to add the below-mentioned code in theme.liquid {{ 'imagesearchlogo.svg' | asset_url | img_tag }} I have tried below-mentioned method in python data={ "asset": { "key": "layout/theme.liquid", "value": ''' {{ 'imagesearchlogo.svg' | asset_url | img_tag }} ''' } } response = requests.put("http...
Arjun Borkhatariya
1

votes
2

answer
872

Views

jQuery: Convert string to “handle” similar to Shopify's Handleize

I'm trying to do the same thing that Shopify's "handleize" does to a string, but with jQuery. https://docs.shopify.com/themes/liquid-documentation/filters/string-filters#handle Basically I want to convert any string to a handle, so Hello, my name is Corey. would become hello-my-name-is-corey using a...
Corey
1

votes
0

answer
13

Views

Shopify liquid How to hide out of stock products until click on element at collection page?

How I can make an element that will hide the "out of stock items" that will be under the stock items and if someone clicks the button, it will open them? I added a photo for example:
Gil s
1

votes
1

answer
570

Views

Shopify - Get product title in liquid?

In the theme settings the end user is able to select a product from a drop down list of all products. This is done in the settings_scheme.json file. [ { { "name": "Home page - Feature Box 2 (Product 1)", "settings": [ { "type": "product", "id": "homepage-grid-product-1" } ] } ] Then using liquid I w...
Dingo Bruce
1

votes
1

answer
851

Views

How to use shopify polaris css components?

I want to use Polaris css components for my shopify app. I have go through their document https://polaris.shopify.com/components/get-started#navigation. As mentioned there I have include their css and html code for a component but some components are not working functionally like Date picker I have...
sank
1

votes
2

answer
568

Views

“App proxy” send request to my “shopify shop” instead of my application ? [Shopify]

Whenever I send a request to my server App proxy sends it to Shopify store for no reason. My Proxy URL: https://example.com/test/public/action But I get this request returned from Ajax GET https://apiahmadztest.myshopify.com/action?shop=apiahmadztest.myshopify.com&path_prefix=%2Fapps%2Ffilter×...
Ahmadz Issa
0

votes
0

answer
55

Views

Retrieve article object including its image using the Shopify JavaScript Buy SDK custom query

I'm using the shopify-buy SDK to try and fetch the articles off of my Shopify store just using JavaScript on the frontend, following the "Expanding the SDK" directions here: https://shopify.github.io/js-buy-sdk/#expanding-the-sdk. Using the code below, I am able to retrieve my articles and some of...
James Heston
1

votes
1

answer
185

Views

Shopify Liquid Syntax - What is the difference between {%- assign [some_var] = [some_val] -%} and {% assign [some_var] = [some_val] %}

When coding in Shopify's Liquid language I notice some variables being assigned using the following syntax: {%- assign variable = value -%} and other variables being assigned using the following syntax: {% assign variable = value %} Could someone explain the difference, if there is any?
D3XT3R
1

votes
1

answer
249

Views

Variable scope in Shopify Sections

I'm trying to use a variable in my section file but it doesn't appear to be inherited from it's parent template. For example: index.liquid {% assign foo = "bar" %} {% section 'example' %} sections/example.liquid {{ foo }} {% schema %} { "name": "Example", "settings": [ ... ] } {% endschema %} It wil...
chrishale
1

votes
2

answer
438

Views

Shopify if homepage?

How do I detect shopify if Homepage? Previously there was a handler which was page.frontpage which is not used anymore. I need to exclude something from the homepage, so I can't go for editing the index.liquid file.
1

votes
1

answer
53

Views

How to add an additional value to a Shopify checkout URL?

My client's live Shopify setup has a feature where a URL goes to a sort of "quick checkout" that allows a customer to quickly purchase a single item. The way it works is, you first visit a URL like this: https://site1.com/cart/xxxxxxxxxxx:y and then you are immediately redirected to a URL like this:...
Ryan
1

votes
1

answer
3.8k

Views

Get the cart items of a given Shopify customer via the Shopify Api?

I understand that the Shopify Rest Api does not have the capability to return shopping cart items. I also understand that the Shopify Ajax Api has the /cart.js endpoint which allows you to retrieve the current user shopping cart. It uses a session cookie to identify the current user. But this means...
Milen Kovachev
1

votes
2

answer
2.2k

Views

Shopify liquid get related blog posts

In shopify I am using liquid templating to get blog posts which are related to products by their tags, like so: {% for article in blogs.blog.articles %} {% if article.tags contains product.handle %} {{ article.title }} {% endif %} {% endfor %} However, if there are no related posts, I would like to...
Sirrah
1

votes
1

answer
707

Views

shopify api: calculate total shipping price

There is a nice helper - shipping_price - available in liquid templates (for order). Returns total order shipping price (hopefully). How do I get the same via API? Should I go through order order.shipping_lines and sum their price? Is that the right way to do it? EDIT Or, perhaps, order.subtotal_pri...
artemave
1

votes
2

answer
1.2k

Views

How to tell if a product is published or not?

I'd like to use the published field on products that's documented here in the Shopify API: Hide a published product by changing the published attribute to false I can change the flag on any product, but I have not figured out yet how to get the published field back from the API. It's not listed the...
Louis B.
1

votes
1

answer
87

Views

OAuth Post Request Failing

I've got everything working up until Step 2 of the OAuth process where you request the actual token. I'm using a very simple jQuery Post request and constantly getting Access Control Origin errors. I've tried contentType: 'application/json' and everything else I know to try. It's just not working an...
Brandon
1

votes
1

answer
1k

Views

Error Creating Shopify Webhook through the API

I am trying to create a Webhook through the API. When the Customer installs the app (Controller): def init_webhooks topics = ["products/create", "products/update", "products/delete"] topics.each do |topic| webhook = ShopifyAPI::Webhook.create(format: "json", topic: topic, address: "http://#{@curren...
Brad Madigan
1

votes
1

answer
1.3k

Views

Blog loop in Shopify not working

I have the following block of code in my index.liquid New & Notable {% for article in blogs[blog.news].articles limit: 4 %} {{ article.title }} {{ article.published_at | date: '%b %d, %Y' }} {% endfor %} Nothing is being outputted after the h2. I've also tried just using {% for article in blogs.arti...
user1380540
1

votes
2

answer
740

Views

Shopify verify webhook call in Scala

I'm implementing a simple web service for a Shopify webhook to call using Play2. I want to verify the call is from Shopify using the 'X-Shopify-Hmac-Sha256' header parameter included. The Shopify docs only contain a Ruby and Php samples, not too hard to translate I thought. Well I seem to be struggl...
glidester
1

votes
1

answer
1.2k

Views

Shopify counts per tags

I am new to shopfiy.I have addded tags like Black, Blue, Green etc. Now i want to show count like Black(12) Blue(1) Green(4) Does anybody help me out Thanks
Mohit Kumar
1

votes
1

answer
9.7k

Views

Shopify Liquid: If Statement

I am trying to enable a div class based on when a user views certain web page eg: blog, index or ../page/webpage The code is like this: {% unless template contains "index" and settings.slideshow_enabled %} {% endunless %} That "container main content" shows an image behind the nav bar. On other page...
Sylar
1

votes
1

answer
1.1k

Views

Postmates integration with Shopify Shipping/Carrier services

so we are looking to integrate this application: https://postmates.com/developer/docs into our Shopify platform. For how it works please check: http://blog.postmates.com/post/104856343907/a-technical-perspective-on-the-postmates-api . So we are looking for add a Carrier Service to our store. And A...
Sidhdharajsinh Sodha
1

votes
1

answer
690

Views

Notification on new user sign up

In Shopify, is it possible to receive an email notification when a new user signs up (just like I get a notification when an order is placed)? I have checked under Settings > Notifications but could not find anything. If this is not a default option provided by Shopify, is it possible to implement...
Swagata
1

votes
1

answer
275

Views

Why is the content downloaded when I set the application/liquid content type header?

I'm building a little Shopify app. I wanna add an application proxy. It all works fine - local path causes the redirect to my page. However if I set the Content-Type: application/liquid header the page should be loaded as a local Shopify page. But when I do that the browser simply downloads the out...
MaGnetas
1

votes
1

answer
934

Views

Shopify: Remove product from collection via API call

I'm trying to use the Shopify API to remove products from a collection. In the docs (https://docs.shopify.com/api/collect) overview it says: DELETE /admin/collects/#{id}.json Remove a Collect from the database While when you jump to the description it says: Remove a product from a collection Destr...
obs
1

votes
2

answer
697

Views

How can I remove the tax line from my checkout?

I'm trying to get rid of the tax line altogether, or hide it from the checkout. I've tried everything I can think of to achieve this, but it's not working. Any suggestions? Please help if you can, it's driving me crazy. Here is the order template, and following that is the checkout.css {% layout se...
vethcl
1

votes
2

answer
986

Views

Access JSON lumps in metafields with Shopify Liquid templates

I was wondering if anyone knew if I can access JSON in Liquid such as the example below. I have created a metafield for the suppliers page with the namespace suppliers_details, with the key suppliers and the value: { name: "Supplier Name One", address: "Supplier Address One" }, { name: "Supplier Nam...
Tom Hamilton Stubber
0

votes
0

answer
5

Views

shopify buy-button.js - how to open cart programmatically in an onclick event handler?

We need to open the "shopify buy-button.js cart" programmatically on behalf of user actions. Is their a simple way to do this? I tried the following. This code almost works as expected. Clicking the Button opens the cart. Obvious this code is wrong. Each click creates an additional cart component. O...
Stefan
0

votes
0

answer
7

Views

Shopify API Get Order via tracking_number

i want to get a shopify order via tracking_number. https://shop.myshopify.com/admin/orders.json?status=any&tracking_number=123 This is not working, because tracking_number is located in the fulfillments array. Is there an easy way to get the order via parameters? I dont want to loop through all ord...
pabsdenn
0

votes
0

answer
4

Views

What is the difference between Shopify App Bridge and embed in shopify admin

I'm currently starting a project on shopify to make an app and I've noticed that they have released Shopify App Bridge but also I have the option to select Embed in shopify when the app is created. Is this one in the same or two different ways to display the app in the users store? If so what are...
FabricioG
1

votes
1

answer
11

Views

Rails: Paypal Express implementation fails with undefined method `checkout_thank_you_url'

I am working on the integration of Paypal Express payments. I am adapting a Standard checkout and I am using the active-merchant gem. Set up should be something like response=gateway.setup_purchase(price, details), where details are all the parameter which PayPal requires. The express gateway requir...
SEJU
3

votes
1

answer
544

Views

Testing oAuth login flow

I'm creating a shopify app. I've written express middleware that will take a shop via query parameter so the route with "/?shop=example-shop" will kick off the login flow, from there the user gets redirected to shopify where if they aren't already logged in they do so then "install" the app, approvi...
ThomasReggi
2

votes
2

answer
997

Views

How to add a product variant with the Ruby gem

What is the correct way to add a product variant? I create the product successfully and it shows up in my Shopify admin. However the price is always zero and the quantity is always infinity. I've tried creating a variant with inventory_quantity and price set, as well as with product_id set in prefi...
realdeal
4

votes
1

answer
32

Views

Shopify - Retrieves multiple variant detail by multiple variant id

Is there any way to get multiple variant details using multiple variant id in single shopify call. Actually, I want to get price of all product variant which are listed in order using shopify call. I know following way for get single variant detail using id GET /admin/variants/#{variant_id}.json /ad...
tejash patel
1

votes
1

answer
309

Views

Rails: first_or_create not working

Very strange issue with first_or_create. Consider the following method: def self.store(session) shop = self.first_or_create(shopify_domain: session.url, shopify_token: session.token) binding.pry shop.save! shop.shopify_domain end When I pry into this method, I can call session.url to get domain2.mys...
Jackson Cunningham
1

votes
1

answer
1.4k

Views

Shopify (liquid): Find number of days between two dates

I am new to Shopify and .liquid files syntax. I can get two dates currently: {% assign product_created_date = product.created_at | date: "%a, %b %d, %y" %} {% assign current_date = 'now' | date: "%a, %b %d, %y" %} which gives me the current date and also the date when the product was created. I wa...
Seyong Cho

View additional questions