1. Go to this page and download the library: Download chiragparekh/katana-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chiragparekh / katana-php-sdk example snippets
hirag\KatanaPhpSdk\Katana;
$katana = new Katana('your-api-token');
// Get all products with pagination
$products = $katana->products()->all();
foreach ($products as $product) {
echo "Product: {$product->name} - SKU: {$product->sku}\n";
}
// Get products with specific query parameters
$products = $katana->products()->all(['page' => 1, 'per_page' => 50]);
// Get first page
$products = $katana->products()->all(['page' => 1]);
// Get specific page with custom per_page
$products = $katana->products()->all(['page' => 2, 'per_page' => 25]);
$product = $katana->products()->get(1);
// Access properties with full IDE support
echo $product->name; // string
echo $product->salesPrice; // float
echo $product->createdAt; // string (ISO 8601 date)
echo $product->isActive; // bool
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.