定制 hashandsalt/lemonsqueezy 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hashandsalt/lemonsqueezy

最新稳定版本:0.6.0.0

Composer 安装命令:

composer require hashandsalt/lemonsqueezy

包简介

Lemon Squeezy E-Commerce plugin

README 文档

README

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

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-17