astina/tradedoubler-bundle

此包已被弃用且不再维护。未建议替代包。

Symfony 2 的 Tradedoubler 集成包

安装量: 2,640

依赖项: 0

建议者: 0

安全: 0

星标: 2

关注者: 20

分支: 0

类型:symfony-bundle

1.2.6 2016-09-15 07:39 UTC

This package is not auto-updated.

Last update: 2022-07-09 03:49:48 UTC


README

Symfony 2 的 Tradedoubler 集成包。

安装

步骤 1: 添加到 composer.json

"require" :  {
    // ...
    "astina/tradedoubler-bundle":"dev-master",
}

步骤 2: 启用包

在内核中启用包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Astina\Bundle\TradedoublerBundle\AstinaTradedoublerBundle(),
    );
}

步骤 3: 配置

将令牌、馈送 ID 和跟踪信息添加到您的 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

使用方法

使用 Model/ 中的类来创建 ProductCategoryProductImageProductCollection 的实例。

使用 astina_tradedoubler.client 服务来创建/更新/删除 Tradedoubler 记录

/** @var \Astina\Bundle\TradedoublerBundle\Client\Client $client **/
$client->createProducts(new ProductCollection($tradedoublerProducts));

将所有产品数据发送到 Tradedoubler

您可以使用 astina:tradedoubler:populate 命令将您的整个产品目录发送到 Tradedoubler。为此,您必须

  1. 创建一个实现 Astina\Bundle\TradedoublerBundle\Client\ProductSourceInterface 的服务。

  2. 将服务 ID 添加到配置中

astina_tradedoubler:
    product_source: my_product_source_service