developertugrul / marketplace-integrator
Amazon and Trendyol Marketplace Integrator for Products and Orders
Package info
github.com/developertugrul/marketplace-integrator
pkg:composer/developertugrul/marketplace-integrator
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.0
- highsidelabs/laravel-spapi: ^2.1
- illuminate/support: ^13.12
- nesbot/carbon: ^3.11
README
A highly optimized, memory-efficient PHP library for pulling, filtering, matching, and copying products and orders from Trendyol and Amazon.
Designed specifically to handle extremely large product catalogs without memory exhaustion by utilizing PHP Generators (yield).
Features
- High Performance: Uses PHP Generators instead of massive arrays. Capable of looping through 100,000+ products with flat memory usage.
- Unified Models: Normalizes completely different API structures (Amazon SP-API and Trendyol Supplier API) into a unified
ProductandOrdermodel. - Standardized Statuses: Order statuses like
Picking,Unshipped, orPendingare all normalized to standard constants likeOrder::STATUS_INVOICED. - Fast Product Copy: Includes a professional column mapper that takes a marketplace product and translates it directly into your database schema using dot-notation.
Installation
composer require developertugrul/marketplace-integrator
Documentation
For full, interactive documentation with code examples, open docs/index.html in your browser.
Quick Start: Column Mapping (Fast Copy)
Easily translate a marketplace product into your Laravel/Eloquent model format:
use DeveloperTugrul\MarketplaceIntegrator\MarketplaceManager; $manager = new MarketplaceManager($mapper); // Add clients... $dbColumnMap = [ 'db_title' => 'title', 'db_price_col' => 'price', 'stock_amount' => 'quantity', 'product_sku' => 'sku', 'brand_name' => 'brand', 'primary_image' => 'images.0', // Supports dot notation! ]; $insertData = $manager->copyProductToDatabaseFormat('trendyol', '8691234567890', $dbColumnMap); // Insert into your database // Product::create($insertData);
Disclaimer
This library focuses entirely on Read, Filter, List, and Map operations. It does not contain endpoints for creating or updating products on the marketplaces.
License
MIT