shopify

Shopify app with reactjs and nodejs without nextjs?

自闭症网瘾萝莉.ら 提交于 2020-03-05 05:05:15
问题 I am developing a shopify app so the reactjs handles the UI part and node-express handles the shopify auth things. The tutorials in shopify site are node, react and nextjs node and express without reactjs My concern is how to test the app without reactjs server side rendering with nextjs? As we know node and react runs one seperate ports, so how can we handle the authentication flow with shopify? How I am trying to work is User enters app -> Node authenticates with shopify -> if auth success

Shopify app with reactjs and nodejs without nextjs?

拈花ヽ惹草 提交于 2020-03-05 05:04:09
问题 I am developing a shopify app so the reactjs handles the UI part and node-express handles the shopify auth things. The tutorials in shopify site are node, react and nextjs node and express without reactjs My concern is how to test the app without reactjs server side rendering with nextjs? As we know node and react runs one seperate ports, so how can we handle the authentication flow with shopify? How I am trying to work is User enters app -> Node authenticates with shopify -> if auth success

How to add script to the front side of the shopify app

强颜欢笑 提交于 2020-03-04 04:29:46
问题 As i am new to shopify app i created an app and installed over a store with script tag having read and write permission . How can i dynamically add the javascript to the front side of shopify app. 回答1: Use the Script Tag API to create the javascript you want to load dynamically. # POST /admin/script_tags.json { "script_tag": { "event": "onload", "src": "https://djavaskripped.org/fancy.js" } } Documentation: Link 回答2: When your App is installed in a Shop, the merchant usually gets two dialogs

How to get multiple products with product ids through Shopify API Gem

江枫思渺然 提交于 2020-02-07 06:01:19
问题 I'm trying to get multiple products through Shopify API Gem. I know how to retrieve one product at a time ShopifyAPI::Product.find(product_id). Thanks! 回答1: Here is some code that has worked for a million times over ... page = 1 count = ShopifyAPI::Product.count puts "Found #{count} products in Shopify" if count > 0 product_details = [] page += count.divmod(250).first while page > 0 products = ShopifyAPI::Product.find(:all, params: {limit: 250, page: page}) product_details += products.collect

Shopify: Is it possible to find a product by sku number?

一世执手 提交于 2020-02-01 05:06:08
问题 The data that I'm getting only contains the SKU numbers. I am trying to figure out how I can link these SKU numbers to the product variants in Shopify without the actual product id number. Example data: <Inventory ItemNumber="100B3001-B-01"> <ItemStatus Status="Avail" Quantity="0" /> </Inventory> <Inventory ItemNumber="100B3001-B-02"> <ItemStatus Status="Avail" Quantity="0" /> </Inventory> <Inventory ItemNumber="100B3001-B-03"> <ItemStatus Status="Avail" Quantity="-1" /> <ItemStatus Status=

How to Login or initiate customer session after Social Login in Shopify

时光怂恿深爱的人放手 提交于 2020-01-25 11:58:05
问题 I want to facilitate customer to login my Shopify site using their social media accounts. But I am not really sure how can I start their session after they successfully pass oAuth with their social accounts. Once they pass the oAuth process I will create customer using Admin API of shopify. but after successfully created customers how can I logged In them. there is something I might be missing. because there are lots off social login apps available on marketplace. 回答1: You have to create

Shopify app - how to include assets using an app-proxy with ruby on rails

六月ゝ 毕业季﹏ 提交于 2020-01-25 07:23:05
问题 I'm building a shopify app-proxy using ruby on rails. i’m using the shopify_app gem. in my controller actions i have the following set: render layout: false, content_type: ‘application/liquid’ ,so that the app is embedded within the shop’s layout/theme.liquid. my question is how do i then pull assets into the app? I’ve tried including them manually into the template files using: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_include

How to handle Shopify API connection with Shopify gem?

假如想象 提交于 2020-01-23 12:11:13
问题 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)

Tag count automatically changing while clicking on the product tag

纵饮孤独 提交于 2020-01-21 20:04:40
问题 I am using Shopify. I am in collection page where I am getting all the filter with tag count something like, All Products Apple(4) Banana(2) Orange(1) Mango(8) Now when I click on any of the tag(For example I clicked on Banana) then It will display the banana products. Now my issue is by clicking on the tag it's changing the tag count. All Products Apple(0) Banana(2) Orange(0) Mango(4) I am using below code {% for tag in collection.all_tags %} {% assign products_count = 0 %} {% for product in

Shopify - Get shop domain inside a app

孤街浪徒 提交于 2020-01-19 06:05:06
问题 I'm new to Shopify app developing and I'm using Node,Express for the back-end and react with polaris libaray. My question is how to get the shop's domain the request is initiating throug h the app. When I searched I could only found one used in Ruby ShopifyAPI::Shop.current and I'm looking for the similar thing to use in node? 回答1: For examples check out https://github.com/BKnights/kotn-shopify-utils Yes it uses a session. The code is pretty idiosyncratic. I published it mostly as an easy way