Symfony 2 bundle for Tradedoubler integration.
"require" : {
// ...
"astina/tradedoubler-bundle":"dev-master",
}
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Astina\Bundle\TradedoublerBundle\AstinaTradedoublerBundle(),
);
}
Add the token, feed ID and trackback infos to your config.yml:
# app/config.yml
astina_tradedoubler:
api_token: xxxxyyyyzzz
feed_id: 123456
trackback:
organization: 1111
event_id: 2222
redirect_default_url: http://myshop.com
Use the classes in Model/ to create instances of Product, Category, ProductImage and ProductCollection.
Use the astina_tradedoubler.client service to create/update/delete Tradedoubler records:
/** @var \Astina\Bundle\TradedoublerBundle\Client\Client $client **/
$client->createProducts(new ProductCollection($tradedoublerProducts));
You can use the astina:tradedoubler:populate commands to send your whole product catalogue to Tradedoubler. For this to work you have to:
Create a service that implements Astina\Bundle\TradedoublerBundle\Client\ProductSourceInterface.
Add the service id to the config:
astina_tradedoubler:
product_source: my_product_source_service
How can I help you explore Laravel packages today?