fond-of-oryx / feed
Creates a data feed. Currently only an availability CSV File SKU/Quantity.
Installs: 14 453
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=8.0
- fond-of-oryx/availability-alert: ^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0
- spryker/product: ^5.0.0 || ^6.0.0
- spryker/router: ^1.1.0
- spryker/store: ^1.2.0
- spryker/zed-request: ^3.3.0
Requires (Dev)
README
1. Install
composer require fond-of-oryx/feed
2. Extend Availability Query Container in PYZ like below
namespace Pyz\Zed\Availability\Persistence;
use Spryker\Zed\Availability\Persistence\AvailabilityQueryContainer as SprykerAvailabilityQueryContainer;
/**
* @method \Spryker\Zed\Availability\Persistence\AvailabilityPersistenceFactory getFactory()
*/
class AvailabilityQueryContainer extends SprykerAvailabilityQueryContainer implements AvailabilityQueryContainerInterface
{
/**
* @api
*
* @return \Orm\Zed\Availability\Persistence\Base\SpyAvailabilityQuery
*/
public function queryAllAvailability()
{
return $this->getFactory()->createSpyAvailabilityQuery();
}
}
3. Console
vendor/bin/console transfer:generate
4. Register Controller
Symfony Routing
add in src/Pyz/Yves/Router/RouterDependencyProvider.php
/**
* @return \Spryker\Yves\RouterExtension\Dependency\Plugin\RouteProviderPluginInterface[]
*/
protected function getRouteProvider(): array
{
return [
...
new FeedRouteProviderPlugin(),
];
}
5. Add basic auth password and user to config file for example in config_default.php
// ---------- Feed
$config[FeedConstants::FEED_USER] = 'foo';
$config[FeedConstants::FEED_PASSWORD] = 'bar';