Supplier imports (Sourcing module)
- Tables:
supplier_feeds:sourceurl | upload;urlencrypted;file_pathon thelocaldisk;format;options(delimiter, item, path);mapping(Data\FeedField=> column);attributes({source, attribute_id});rules(create, vat, update_cost, update_price, markup, rounding);schedule.supplier_feed_dictionary:kindcategory | brand | value;attribute_id0 unless value;source_value;target_id;ignored;seen.supplier_products: feed,supplier_sku,variant_id, cost in the supplier's minor units and currency,supplier_stock,created_by_feed,last_seen_at.supplier_feed_runs: status, counts, skipped reasons and examples, error.
Feeds\FeedFetcher:- HTTPS only, through
Platform\Webhooks\SafeUrl, connecting to the checked address (CURLOPT_RESOLVE); - no redirects; a size limit while downloading (200 MB feeds, 10 MB images); to a temporary file.
- HTTPS only, through
Feeds\FeedReaderflattens each product tocolumn => text:- CSV: delimiter sniffed, BOM and Windows-1250 handled;
- XML: streamed with
XMLReader,LIBXML_NONET, no entity substitution; nesteda/b, attributes@x, repeats joined with|; - JSON: up to 50 MB, list at a dotted path.
Actions\RunFeed:- Rows go in chunks of 200, matched by link, SKU, then GTIN (
VariantDirectory::variantsByGtin()). - Existing variants get only cost (
Inventory\Contracts\Costs::setManual(), RON viaExchangeRates::convert()) and price (CatalogImport::price(), rules permitting). - New ones are drafts through
CatalogImport::product()(active: false),specifications()andimage(). - Dictionary words are matched on first sight through
Catalog\Contracts\Taxonomy(brandNamed(),valueNamed(), unaccented) andCatalogBrowser::categoryOptions(). - Descriptions lose script/style blocks and tags.
- A failure records
InvalidArgumentExceptionmessages; anything else is reported and shown generically.
- Rows go in chunks of 200, matched by link, SKU, then GTIN (
Jobs\RunFeedJob(unique per feed),sourcing:run(hourly at :15, queues due feeds),Inventory\Contracts\Suppliersfor the supplier list and currency.- Admin:
SupplierFeedController(admin.sourcing.*, tabs, sample, run),DictionaryController, permissionsupplier_feeds.manage.
Tests: tests/Feature/Sourcing/SupplierFeedsTest.php.