fond-of-spryker / feed
Creates a data feed. Currently only an availability CSV File SKU/Quantity.
Installs: 3 312
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- fond-of-spryker/availability-alert: ^1.0.0 || ^2.0.0
Requires (Dev)
- codeception/codeception: ^2.3
- mikey179/vfsstream: ^1.6
- php-coveralls/php-coveralls: ^2.0
- phpro/grumphp: ^0.14
- sebastian/phpcpd: ^4.0
- spryker/code-sniffer: ^0.11
README
1. Install
composer require fond-of-spryker/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. Add ControllerProvider FeedControllerProvider.php to YvesBootstrap
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';