定制 findologic/plentymarkets-rest-exporter-new 二次开发

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

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

findologic/plentymarkets-rest-exporter-new

Composer 安装命令:

composer create-project findologic/plentymarkets-rest-exporter-new

包简介

FINDOLOGIC exporter for exporting product data via the plentymarkets REST API

README 文档

README

GitHub Actions Tests codecov

Table of Contents

  1. Synopsis
  2. Requirements
  3. Installation
  4. Running the export
  5. Development
    1. Running the export
      1. Using a shopkey to run the export
      2. Configuration
      3. Debugging the export

Synopsis

This is a work in progress rewrite of the findologic/plentymarkets-rest-export.

The Plentymarkets REST API is being called to get all necessary product data for FINDOLOGIC. The data is then wrapped to generate a FINDOLOGIC-consumable XML/CSV file. In the case of XML this could be multiple files.

Requirements

  • PHP >= 7.4
  • PHP JSON extension
  • Composer

Installation

  1. Run composer install to install all required dependencies.
  2. Copy .env to .env.local, and set the configuration for the shop, you want to export the data from.

Running the export

  1. Run bin/console export:start.
  2. When the export was successful, you may be able to find the exported CSV/XML file in the /export directory.
  • If you have a shopkey, see Using a shopkey to run the export.
  • If debug mode is true, you may be able to find all requests/responses inside of the /var/debug directory.

If you want to debug, read more about debugging the export.

Development

Directory structure

  • .github Contains everything related to GitHub, including GitHub Actions.
  • bin Contains executables. E.g. Running the export.
  • config Contains configuration files. E.g Export configuration.
  • var/debug Contains Request/Responses after starting an export.
  • var/export Contains the exported XML(s)/CSV file(s).
  • var/log Contains the log of the last export.
  • src Contains all source code.
  • tests Contains all unit-tests.
  • vendor Contains source code of dependencies.

Running tests

Running tests is as simple as it gets. Either run composer test, or use your IDE to run the tests. When running them with the IDE you may want to include phpunit.xml.dist as alternative configuration file.

Using a shopkey to run the export

NOTE: Running an export with a shopkey requires the option IMPORT_DATA_URL to be set in your environment file!

You can also run the export for a specific shopkey by calling the export with an additional shopkey parameter or bin/console export:start [shopkey].

When a shopkey is supplied, the EXPORT_xxx environment variables may be ignored.

Configuration

Here is a short table that explains each configuration option. Configuration changes can be done in your environment files.

Configuration option Description
EXPORT_USERNAME The user which is used to authenticate to the REST API. It needs these permissions to successfully export.
EXPORT_PASSWORD The password of the API user.
EXPORT_DOMAIN The domain of the shop without protocol (http/https). E.g. www.your-shop.com
EXPORT_MULTISHOP_ID The multiShopId of the shop. Each language has their own multiShopId at Plentymarkets. It is also known as "Webstore ID".
EXPORT_AVAILABILITY_ID Products that have this availability id assigned, won't be exported.
EXPORT_PRICE_ID Id of the exported prices that should be shown.
EXPORT_RRP_ID Id of the recommended retail price that should be shown.
EXPORT_LANGUAGE Language of the shop. E.g. DE, EN, FR
EXPORT_UNAVAILABLE_VARIATIONS If active, unavailable variants will be exported.
EXPORT_REFERRER_ID Only options including this ID within "Referrers" will be exported. All properties will be exported, if not set.
EXPORT_ORDERNUMBER_PRODUCT_ID If active, the product ID will be exported as an order number.
EXPORT_ORDERNUMBER_VARIANT_ID If active, the variant ID will be exported as an order number.
EXPORT_ORDERNUMBER_VARIANT_NUMBER If active, the variant number will be exported as an order number.
EXPORT_ORDERNUMBER_VARIANT_MODEL If active, the variant model will be exported as an order number.
EXPORT_ORDERNUMBER_VARIANT_BARCODES If active, the variant barcodes will be exported as an order numbers.
EXPORT_FREE_TEXT_FIELDS If active, the free text fields will be exported as attributes.
EXPORT_DIMENSION_UNIT Unit for the configured length/width/height of the products.
EXPORT_WEIGHT_UNIT Unit for the configured weight of the products.
DEBUG Boolean that if set to true, will log all requests/responses inside of the debug folder.
IMPORT_DATA_URL Adding this to your config allows you to call the export with an additional shopkey parameter.

Debugging the export

If you want to debug the export, you can simply right-click bin/console inside of the IDE and select "Debug 'export (PHP Script)'".

Setting the environment variable "DEBUG" to true, will automatically create request/response files inside of the var/debug folder.
If you no longer need them, they can be cleared anytime running composer clear, or bin/clearExportFiles.

findologic/plentymarkets-rest-exporter-new 适用场景与选型建议

findologic/plentymarkets-rest-exporter-new 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 898 次下载、GitHub Stars 达 4, 最近一次更新时间为 2021 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 findologic/plentymarkets-rest-exporter-new 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 findologic/plentymarkets-rest-exporter-new 我们能提供哪些服务?
定制开发 / 二次开发

基于 findologic/plentymarkets-rest-exporter-new 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-15