GithubHelp home page GithubHelp logo

kirby3-lemonsqueezy's Introduction

WARNING This plugin is shiny new beta! Use with caution and please feedback any issues via Github issues if you have any problems.

Kirby3 Lemon Squeezy

A plugin for working with the Lemon Squeezy API.

Features

  • Fetch Store(s)
  • Fetch Product(s)
  • Turns products into virtual pages

ææ Install

composer require hashandsalt/lemonsqueezy

You can also install manually by placing the folder inside your plugins folder.

Config

Add your API keys to the Config.php

// API Keys
'hashandsalt.lemonsqueezy.testmode' => true, // flick to false in to use the live API
'hashandsalt.lemonsqueezy.testapikey' => 'XXX',
'hashandsalt.lemonsqueezy.liveapikey' => 'XXX'

Change the default template and model for the virtual pages (optional)

// Virtual Pages
'hashandsalt.lemonsqueezy.template' => 'products',
'hashandsalt.lemonsqueezy.model' => 'products',

Usage

Fetching store data

An array of all stores

$stores = $site->stores();

A specific store by ID

$store = $site->store('11087');

Fetching product data

An array of all products

$products = $site->products();

A specific product by ID

$product = $site->product('22352');

Virtual Pages

Available fields in the virtual pages

'title'             => $productitem->attributes->name,
'description'       => $productitem->attributes->description,
'product_status'    => $productitem->attributes->status,
'thumb_url'         => $productitem->attributes->thumb_url,
'large_thumb_url'   => $productitem->attributes->large_thumb_url,
'price'             => $productitem->attributes->price,
'formatted_price'   => $productitem->attributes->price_formatted,
'buy_now_url'       => $productitem->attributes->buy_now_url

kirby3-lemonsqueezy's People

Contributors

hashandsalt avatar

Stargazers

Martin Allien avatar  avatar Agnieszka Pogorzelska avatar Grant Hutchinson avatar Scott Boms avatar Bruno avatar Bruno Meilick avatar Tobias Möritz avatar Ahmet Bora avatar

Watchers

Ahmet Bora avatar  avatar

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.