Giter Club home page Giter Club logo

shopify-php-app's Introduction

A simple Shopify app in PHP.

Getting Started

Create a new file called .env which contains your Shopify API credentials and server hostname (with port).

See .env.example for an example.

Install dependencies

First, ensure your PHP version is 7.0 or greater. (php -v)

Then install the necessary project dependencies through composer:

cd src
composer install

Run the application

cd src/public
php -S localhost:8000

Installing to your Shopify store

Navigate to the following URL in your browser:

http://localhost:8000/?shop=my-test-shop.myshopify.com

Making the appropriate subsitutions for your hostname and myshopify domain.

Advanced Usage

helpers.php includes a simple API wrapper for Shopify.

See this gist for a more advanced usage example of performShopifyRequest().

shopify-php-app's People

Contributors

jamiemtdwyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shopify-php-app's Issues

I am being redirected to a non-embedded version

Upon installing the app, I am being redirected to a non-embedded version. When accessing the app from the installed apps list, the app is redirecting to the embedded version. This occurs when an initial OAuth request redirect fails to escape the iframe.

Safari iframe is giving CSP frame ansectors directive error

I am getting a Content security policy error in the console for the safari iframe(after version 13).

In the installation in the / API, After running this code,
return $response->withRedirect($installUrl);

the user redirect to the auth/Shopify/callback API & then The app gets crashed and I get 2 errors in the console

(1) unrecognized CSP directive ‘worker-src’.
(2) refused to load as https://demo.com/admin/auth because it does not appear in the frame-ancestors directive of CSP.

I have tried everything from .htaccess to middleware and header() function and all, getting no success, Please help me to solve this issue, As in safari, the app is not loading at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.