shopify

Embed Vue component within Shopify store

我们两清 提交于 2020-05-28 03:48:28
问题 Within a product page, I am trying to display a custom Vue component. For brevity, the component displays some information from a Firebase database based on the given product id. I originally tried to make this a Shopify app so I could access their APIs. I implemented OAuth and can retrieve the required information. However, actually including the component within the store has been unsuccessful. What is the best way of including Vue inside Shopify? I have tried including the script files

Using vue.js in Shopify liquid templates

房东的猫 提交于 2020-05-10 04:20:05
问题 This should be simple but despite searching I was unable to find any solution to this. How do you use vue template tags within a liquid file? Since both Vue and liquid use the same curly brackets, I'm unable to render any of my view data: <img src="{{ product.featured_image }}" /> results in: <img src> There are 36 products in my parent view component. When I try to use custom delimiters: new Vue({ delimiters: ['@{{', '}}'], It won't parse with Vue: GET https://inkkas.com/collections/@ 404

How to create an order from sales channel and redirect the user to Shopify store for payment?

丶灬走出姿态 提交于 2020-04-18 06:13:58
问题 I am working on an e-commerce website similar to E-bay or Amazon, where sellers can list their products. I have also created a Shopify Sales Channel for my e-commerce website, which can import products from Shopify. A Shopify store installs the Sales Channel App and their products will be imported to my e-commerce website. All of this is working fine... now I want to build the last step, which is buy the product. A buyer comes to my e-commerce website and wants to buy a product which has been

Shopify app with proxy extension POST requests not working

青春壹個敷衍的年華 提交于 2020-04-18 05:36:33
问题 Following the guide here: https://shopify.dev/tutorials/display-data-on-an-online-store-with-an-application-proxy-app-extension GET requests are working fine for me. But when I try to do a POST request, my parameters are not coming through. I'm building a simple wishlist app, where a user can click on a heart on a product and it adds it to a database. So my code, when they click the heart, looks something like this: $.ajax({ url: '/apps/wishlist/save', type: 'POST', data: { shop: shop,

Shopify app with proxy extension POST requests not working

时光怂恿深爱的人放手 提交于 2020-04-18 05:36:05
问题 Following the guide here: https://shopify.dev/tutorials/display-data-on-an-online-store-with-an-application-proxy-app-extension GET requests are working fine for me. But when I try to do a POST request, my parameters are not coming through. I'm building a simple wishlist app, where a user can click on a heart on a product and it adds it to a database. So my code, when they click the heart, looks something like this: $.ajax({ url: '/apps/wishlist/save', type: 'POST', data: { shop: shop,

Nuxt Apollo Shopify Graphql

依然范特西╮ 提交于 2020-04-17 20:37:11
问题 So I am using the https://github.com/nuxt-community/apollo-module I am trying to set this up to connect to my shopify graphql API On nuxt.config.js: apollo: { clientConfigs: { default: { httpEndpoint: 'https://my-store.myshopify.com/admin/api/2020-01/graphql.json', getAuth: () => 'Bearer 26cfd63bbba75243b55fad2c8de0a12f' }, } }, on index.vue, i have the following: <script> import gql from 'graphql-tag' export default { apollo: { data: { query: gql` query { shop { name } } `, } } } </script>

How to use the new @Shopify/app-bridge with @Shopify/polaris-react

此生再无相见时 提交于 2020-04-16 02:07:08
问题 Shopify recently released their new @shopify/app-bridge, but it is unclear to me how it should be used alongside @shopify/polaris. For example, I have tried to make a React component that will use the app-bridge and polaris to display a toast. import React, { Component } from "react"; import * as PropTypes from "prop-types"; import { Toast } from "@shopify/app-bridge/actions"; import { Page } from "@shopify/polaris"; class Start extends Component { static contextTypes = { polaris: PropTypes

Passing previously assigned variable in `{% for` block in Shopify

穿精又带淫゛_ 提交于 2020-03-26 04:02:26
问题 In blog-templte.liquid {% assign articleSortOrder = '' %} .... {% for article in blog.articles {{articleSortOrder}} %} got an error : Liquid syntax error: Unexpected character { in "article in blog.articles {{articleSortOrder}}" The intention is to pass the variable to sort the articles depending on some condition. Q: is how to make it work? 回答1: This is not a valid liquid code: {% for article in blog.articles {{articleSortOrder}} %} You can't pass a liquid inside a liquid, a.k.a {% {{ }} %}

Switch provider for the omniauth-shopify-oauth2 gem in runtime?

痴心易碎 提交于 2020-03-23 08:12:18
问题 The initializer for the omniauth-shopify-oauth2 gem is supposed to look like this: # config/initializers/omniauth.rb Rails.application.config.middleware.use OmniAuth::Builder do provider :shopify, ENV['SHOPIFY_API_KEY'], ENV['SHOPIFY_SHARED_SECRET'] end However, in our Rails app resides a few different brands who offers the same functionality. Throughout the entire app, the request.domain of a request determines which brand you are exposed to ( brand1.example.com , brand2.example.com , etc.).

How to create pagination in shopify rest api using php

。_饼干妹妹 提交于 2020-03-10 05:12:46
问题 I created curl in php for use shopify product rest API. Now I want to create pagination in that. How to create? Link: "<https://{shop}.myshopify.com/admin/api/{version}/products.json?page_info={page_info}&limit={limit}>; rel={next}, <https://{shop}.myshopify.com/admin/api/{version}/products.json?page_info={page_info}&limit={limit}>; rel={previous}" How to use Link ? Thanks 回答1: As of API version 2019-07 you do indeed need to use cursor based pagination. First make a normal API call, include