Skip to content

Commerce Foundations is our pre-built Craft Commerce store. See what it includes

Craft CMS plugins

Product Feeds

Build auto-updating product feeds for shopping and social platforms from Craft Commerce variants, Craft entries, or custom sources.

Events

ProductFeeds::EVENT_REGISTER_SOURCES#

Fires: whenever the plugin looks up registered sources, including for the Source menu, the feed index, feed validation, and every load of a feed on a custom source. Expect several calls per request, so avoid queries in the listener.

Payload: craft\events\RegisterComponentTypesEvent

Property Type Notes
types list<class-string<CustomSource>> Empty by default. Add a class that extends fostercommerce\productfeeds\sources\CustomSource

Listen:

use craft\events\RegisterComponentTypesEvent;
use fostercommerce\productfeeds\ProductFeeds;
use modules\feeds\PosterSizesSource;
use yii\base\Event;

Event::on(
	ProductFeeds::class,
	ProductFeeds::EVENT_REGISTER_SOURCES,
	static function (RegisterComponentTypesEvent $event): void {
		$event->types[] = PosterSizesSource::class;
	}
);

Common use: adding a source that publishes one item per size, finish, or other option an element offers. To write the class, see add a custom source.

We can take it from here.

We take on the Craft and Craft Commerce sites you built, so you can get back to building. Introduce a client who signs a management contract and you get a $3,000 partnership fee.

How the Dev Partnership Program works
See if we’re a fit