king-of-web-designs/laravel-xpos 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

king-of-web-designs/laravel-xpos

最新稳定版本:v1.0.2

Composer 安装命令:

composer require king-of-web-designs/laravel-xpos

包简介

This package connects the Xpos till system to a laravel application via the Xpos API

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

King Of Web Designs

Installation

You can install the package via composer:

composer require king-of-web-designs/laravel-xpos

You can publish and run the migrations with:

php artisan vendor:publish --tag="laravel-xpos-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="laravel-xpos-config"

This is the contents of the published config file:

return [
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="laravel-xpos-views"

Usage

Basic usage. Add the use statement at the top of your controller or wherever you wish to use the packge. Then call the function along with call function required (listed below) to return an array of that data.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

public function useLaravelXpos()
{
   $Xpos = new LaravelXpos();

   return $Xpos->sales();

}

In your .env file include the variables XPOS_TEST_API_KEY and XPOS_URL. A future release will add a test mode and a live test key & url.

Please contact XPOS directly for your shop API URL and API Key.

XPOS_TEST_API_KEY="YOUR API KEY"
XPOS_URL="YOUR URL"

Brands (GET)

Returns an array of the brands used by the shop.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$Xpos = new LaravelXpos();
$Xpos->brands();

Groups (GET)

Returns an array for the Groups used by the shop. Groups are held in a 3 tier structure. Where ParentGroupID is null, the group is a root. It can have any number of child groups beneath it where the ParentGroupID of another group equals the GroupID of the root node. These children are linked to other groups in the same way.

Root Nodes are known as “Departments“ in Xpos cloud. Their children are “Product Groups” and the grand children are “Sub Groups”. Products are only ever linked to Sub Groups via the GroupID property in products.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$Xpos = new LaravelXpos();
$Xpos->groups();

Customer (GET) - requires: customerid

Returns a specific customer record based on the customer id given. Cannot access 'Internal' customers.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$customerID = '1234'; //Get your customer id here. 

$Xpos = new LaravelXpos();
$Xpos->customer($customerID);

Customers (GET) - requires: page number (default = 1)

Returns an array customers in pages of 25 records. Cannot access ‘Internal’ customers.

Pass the page number and a date to return further pages and customers based on the the 'Last Adjusted Date' field. The date passed will return records before this date.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$pageNo = '1'; //Get your customer id here. 
$dateTime = '2025-02-10 11:46:37.933';

$Xpos = new LaravelXpos();
$Xpos->customers($pageNo, $dateTime);

Inventory (GET) - BROKEN:TO BE FIXED - requires: page number (default = 1)

Returns an array of stock levels for matching products in the shop in pages of 25.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$pageNo = '1'; //Get your customer id here.

$Xpos = new LaravelXpos();
$Xpos->inventory($pageNo);

Products (GET) - requires: page number (default = 1)

Returns an array of products stock in the shop in pages of 25.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$pageNo = '1'; //Get your customer id here.

$Xpos = new LaravelXpos();
$Xpos->products($pageNo);

Sales (GET) - requires: page number (default = 1)

Returns an array of all sales since a specific date. Only returns completed sales

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$pageNo = '1'; //Get your customer id here. 
$dateTime = '2025-02-10 11:46:37.933';

$Xpos = new LaravelXpos();
$Xpos->sales($pageNo, $dateTime);

Staff (GET)

Returns an array of the staff in the shop.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$Xpos = new LaravelXpos();
$Xpos->staff();

VatRates (GET)

Returns an array of current VAT Rates in shop.

use KingOfWebDesigns\LaravelXpos\LaravelXpos;

$Xpos = new LaravelXpos();
$Xpos->vatRates();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-17