onecode/shopflix-connector-library

This package is abandoned and no longer maintained. No replacement package was suggested.

Official SHOPFLIX connector library for php projects by Onecode

1.1.0 2022-11-21 13:14 UTC

This package is auto-updated.

Last update: 2024-07-21 16:59:36 UTC


README

GitHub version GitHub license PHP Version Require

Library to connect with Shopflix (https://shopflix.gr) for vendors

For >= Php7.1 <= Php7.2 use the php71_php72 branch. Via composer

composer require onecode/shopflix-connector-library:0.0.1

For >= php7.3 use the main branch. Via composer

composer require onecode/shopflix-connector-library

Usage

use \Onecode\ShopFlixConnector\Library\Connector;
$connector = new Connector("username", "appi_key", "api_url");

Get new orders

$newOrders = $connector->getNewOrders();

Get canceled orders

$canceledOrders = $connector->getCancelOrders();

Get partial shipped orders

$partialShipped = $connector->getPartialShipped();

Get shipped order

$shipped = $connector->getShipped();

Update order to shopflix set status to picking mode use on acceptance.

 $order = 123;#Shopflix Order id
 $connector->picking($orderId);

Reject order

 $order = 123;#Shopflix Order id
 $connector->reject($orderId, "The product has been removed");

Get shipment for specific order

 $order = 123;#Shopflix Order id
 $shipments =  $connector->getShipment($orderId);

Create tracking voucher

 $shipmentId = 123;#Shopflix Shipment id
 $voucher = $connector->createVoucher($shipmentId);

Print tracking voucher number

 $trackingVoucher = "tracking_voucher";
 $voucher = $connector->printVoucher($trackingVoucher); 

Mass print tracking voucher.Max 20 vouchers

 $trackingVouchers = [
     "tracking_voucher1",
     "tracking_voucher2",
     "tracking_voucher3",
     ...
     "tracking_voucher19",
 ];
 $voucher = $connector->printVouchers($trackingVoucher); 

Get tracking voucher number from specific shipment

 $shipmentId = 123;#Shopflix Shipment id
 $voucher = $connector->getVoucher($shipmentId);