shopify-app

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 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

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

GraphQL::Client::DynamicQueryError Expected definition to be assigned to a static constant

守給你的承諾、 提交于 2020-01-13 03:39:08
问题 How to make proper ShopifyAPI::GraphQL method in Rails. Trying the below code in rails console works fine. But when I tried to put that code and make a method in Rails controller/model, i'm getting: GraphQL::Client::DynamicQueryError Expected definition to be assigned to a static constant shopify_client client = ShopifyAPI::GraphQL.new SHOP_NAME_QUERY = client.parse <<-'GRAPHQL' { shop { name } } GRAPHQL result = client.query(SHOP_NAME_QUERY) I tried to play around with variables following

Shopify: How to delete database entry fast after uninstall web-hook response, so the merchant uninstall and re-install quickly?

孤者浪人 提交于 2019-12-24 19:23:13
问题 This is my code in callbackController.php file $url = 'https://' . $_GET['shop'] . '/admin/webhooks.json'; $webhookData = [ 'webhook' => [ 'topic' => 'app/uninstalled', 'address' => config('app.url').'uninstall.php?shop='.$shop, 'format' => 'json' ] ]; $uninstall = $sh->appUninstallHook($accessToken, $url, $webhookData); This is my uninstall.php file code , these file is in laravel root folder. $connection = new mysqli("localhost", "username", "******", "database"); $delete_shop = "DELETE

Shopify Customized Search using external services

前提是你 提交于 2019-12-08 06:45:55
问题 My situation: we have a Shopify store, we also have a search engine implemented and hosted on AWS. We need to use that search engine instead of the default /search on our Shopify store. Ideally, when users try to search something, their query (and potentially some other stuff like attribute selectors/checkboxes on the front end) will be passed to our search engine. Then after the result is back, they will be rendered at the front end. My Question: how should I do this? Option 1: modify the

Shopify Customized Search using external services

試著忘記壹切 提交于 2019-12-07 14:51:26
My situation: we have a Shopify store, we also have a search engine implemented and hosted on AWS. We need to use that search engine instead of the default /search on our Shopify store. Ideally, when users try to search something, their query (and potentially some other stuff like attribute selectors/checkboxes on the front end) will be passed to our search engine. Then after the result is back, they will be rendered at the front end. My Question: how should I do this? Option 1: modify the theme code, inject some javascript to call the search engine (Possible, but messy) Option 2: write an app