定制 and/yandex_yml 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

and/yandex_yml

Composer 安装命令:

composer require and/yandex_yml

包简介

Yandex Market YML generator

README 文档

README

sfYandexYML plugin
==============

Some classes helping to create XML files for the [Yandex.Market service](http://market.yandex.ru).
Description of the YML language [http://partner.market.yandex.ru/legal/tt/](http://partner.market.yandex.ru/legal/tt/).

Installation
------------

  * Install the plugin

        $ symfony plugin:install sfYandexYMLPlugin

  * Clear cache

        $ symfony cc

Usage
-----

    [PHP]

    // creating a YML document
    $yml = new sfYandexYML(
        'My eShop',
        'OOO Roga&Kopita',
        'http://my-shop.com');

    // creating categories
    $cat1 = new sfYandexYMLCategory(1, 'T-shirts');
    $cat2 = new sfYandexYMLCategory(2, 'Drinks');
    $cat2 = new sfYandexYMLCategory(3, 'Vodka', 2); // child of Drinks

    // adding categories to document
    $yml->addCategory($cat1);
    $yml->addCategory($cat2);
    $yml->addCategory($cat3);

    // creating a simple offer
    $offer = new sfYandexYMLOffer_Model(1, true); // simple offer
    $offer->country_of_origin = 'Russia';
    $offer->currencyId = 'RUR';
    $offer->categoryId = $cat3->getId();
    $offer->delivery = true;
    $offer->description = $product->getShortDescription();
    $offer->downloadable=false;
    $offer->local_delivery_cost = 200;
    $offer->name = "Stolichnaya 0.5l";
    $offer->picture = 'http://my-shop.com/pix/stolichnaya.jpg';
    $offer->price = '329.99';
    $offer->sales_notes = 'Design bottle';
    $offer->url = 'http://my-shop.com/shop/drinks/stolichnaya05l.html';
    $offer->vendor = 'OAO Kristall';
    $offer->vendorCode = '12712-80';

    // adding the offer to document
    $yml->addOffer($offer);

    $yml->generateYML(); // generate document
    $yml_as_string =  $yml->saveYML(); // get YML as string

统计信息

  • 总下载量: 154
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-08-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固