Download the PHP package justinholtweb/craft-eat without Composer

On this page you can find all versions of the php package justinholtweb/craft-eat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-eat

Eat

Product feeds for Craft Commerce. Point a merchant channel at a URL and stop hand-writing Twig.

Eat turns your Commerce catalogue into the file Google, Meta, Pinterest, Microsoft, TikTok and a dozen other channels expect: their attribute names, their required fields, their vocabulary for "in stock", in RSS, XML, CSV, TSV or JSON, regenerated on a schedule and delivered wherever the channel wants it.

Requirements

Craft CMS 5.3+, Craft Commerce 5.0+, PHP 8.2+. SFTP delivery additionally needs phpseclib/phpseclib ^3.0; FTP delivery needs PHP's ftp extension.

Installation

Channels

Channel Default format Notes
Google Shopping RSS 2.0 Merchant Center primary feed, g: namespace
Google Local Inventory CSV Per-store availability and price
Meta (Facebook & Instagram) CSV Commerce Manager catalog
Pinterest RSS 2.0 Catalogs data source
Microsoft (Bing) Shopping TSV Microsoft Merchant Center
TikTok CSV sku_id rather than id
Snapchat CSV Snapchat Catalogs
Criteo XML <products><product>, instock as true/false
Awin CSV Affiliate datafeed columns
idealo CSV German vocabulary out of the box
Kelkoo XML Hyphenated element names
PriceRunner TSV Title-case column names
Shopzilla / Connexity TSV
Rakuten Advertising TSV
Custom CSV Name every column or element yourself

Each channel arrives with its attributes already mapped to the Commerce data they almost certainly mean — g:id to the variant SKU, g:price to the catalogue price with a currency code, g:availability to the stock state in that channel's wording.

Quick start

  1. Eat → Feeds → New feed. Name it, pick the channel and format.
  2. Products. Choose product types and statuses; optionally require an image or a price, exclude SKUs with wildcards, or (Pro) match with Craft's condition builder.
  3. Attributes. The channel's attributes are already listed. Point anything still empty at a custom field, a static value or the taxonomy map.
  4. Delivery. Leave it on "write a file" and copy the URL, or push it to a volume, an FTP/SFTP server, or Merchant Center directly.
  5. Schedule. Pick an interval, then run php craft eat/feeds/generate --due from cron.

Hit Preview at any point: it runs the same generator the real feed does, so what you see is what the channel gets.

Where values come from

Each row of the attribute map has a source:

Source Value column holds
Product attribute one of the names below, e.g. salePriceWithCurrency
Custom field a field handle, optionally with a path: gallery.0.url
Static value the literal text written in every row
Taxonomy map productType, or a field handle to map from
Twig template (Pro) {{ object.product.myField }} — object is the variant

Variant fields win over product fields, so a variant-level override does what you expect.

Product attributes

sku id productId variantId uid itemGroupId slug · title variantTitle fullTitle description plainDescription productType productTypeName brand condition status siteName storeName · url imageUrl additionalImageUrls allImageUrls imageCount · price basePrice promotionalPrice salePrice priceWithCurrency promotionalPriceWithCurrency salePriceWithCurrency currency · availability stock inStock minQty maxQty variantCount · weight weightWithUnit length width height dimensions freeShipping shippingCategory taxCategory · dateCreated dateUpdated postDate expiryDate

Modifiers (Pro)

Chain them with |, arguments after :

strip_tags decode_entities collapse_whitespace truncate prefix suffix replace regex_replace upper lower ucfirst number multiply map default

Rows

Delivery

Mode What happens
File Written under the feed directory, served from a stable public URL. Written to a staging file and renamed into place, so a channel fetching mid-run never gets half a feed.
Volume (Pro) Written into a Craft asset volume — S3, DigitalOcean Spaces, anything with a filesystem.
FTP / SFTP (Pro) Uploaded on every run. Use environment variables for the credentials.
Merchant Center (Pro) Pushed with the Content API v2.1 in batches of 100, authenticated with a service-account key. No Google SDK required.

The local file is always written first, so the URL keeps working even when a remote destination is down — and the run log says which half failed.

Feeds can also be served live at /eat/feed/<handle>, generated on request and cached for the feed's interval.

Scheduling

Without cron, leave Schedule from web requests on: after a front-end request Eat queues anything due, throttled to once a minute and guarded by a mutex. Pro feeds can also regenerate when a product is saved — queued and debounced, so resaving a whole section costs one job per feed.

Console

Feeds live in the database, not project config — merchants edit them on production. export and import move them between environments; importing over a matching handle updates rather than duplicates.

Twig

Settings

Feed directory, default brand, image transform, queue vs in-request generation, the request scheduler, batch size, live-route toggle and cache duration, and how many runs to keep per feed.

Testing

License

Proprietary — the Craft License. See LICENSE.md.


All versions of craft-eat with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-dom Version *
ext-openssl Version *
craftcms/cms Version ^5.3.0
craftcms/commerce Version ^5.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package justinholtweb/craft-eat contains the following files

Loading the files please wait ...