feeds 产品导入的配置和注意事项

PHP 版本 7.0.6, 为了避免 针对PHP7 的兼容性问题, 一些插件使用了 dev 版本.

还有一些使用了dev 版本是由于非dev版本存在某些 bug.

所需模块:

feeds-7.x-2.0-beta1

commerce_feeds-7.x-1.4

commerce_physical-7.x-1.x-dev

physical-7.x-1.x-dev

media-7.x-2.0-beta1

media_feeds-7.x-2.x-dev  7.x-2.0-alpha1+12-dev

tamper-7.x-1.x-dev

dimension-7.x-1.0

commerce_product_dimensions-7.x-1.2

weight-7.x-3.1

drush:

drush dl feeds commerce_feeds physical-7.x-1.x-dev commerce_physical-7.x-1.x-dev media media_feeds-7.x-2.x-dev tamper-7.x-1.x-dev dimension commerce_product_dimensions weight

启用模块:

feeds-7.x-2.0-beta1
feeds_ui-7.x-2.0-beta1
feeds_import-7.x-2.0-beta1

commerce_feeds-7.x-1.4
commerce_feeds_example-7.x-1.4

tamper-7.x-1.x-dev

feeds_tamper-7.x-1.x-dev  7.x-1.1+1-dev
feeds_tamper_ui-7.x-1.x-dev  7.x-1.1+1-dev

media-7.x-2.0-beta1

media_feeds-7.x-2.x-dev  7.x-2.0-alpha1+12-dev

physical-7.x-1.x-dev

commerce_physical-7.x-1.x-dev

media-7.x-2.0-beta1

dimension-7.x-1.0

commerce_product_dimensions-7.x-1.2

weight-7.x-3.1

drush:

drush en –y feeds feeds_ui feeds_import commerce_feeds commerce_feeds_example physical commerce_physical media media_feeds tamper feeds_tamper feeds_tamper_ui dimension commerce_product_dimensions weight

说明:

physical, commerce_physical,dimension,commerce_product_dimensions,weight 是为了支持产品重量,尺寸.

media, media_feeds 为了支持产品图片.

tamper, feeds_tamper, feeds_tamper_ui 支持对导入文件的预处理. 例如将图片列表拆分, 对产品价格作 乘以 100 的计算.

注意:

media_feeds 为非dev版时, 可能出现 Notice: Only variables should be passed by reference in MediaFeedsLibraryProvider->__construct() (line 40 of /home/nginx/domains/hi.thatk.com/public/sites/all/modules/media_feeds/includes/MediaFeedsLibraryProvider.inc).

feeds_tamper-7.x-1.1 可能出现 feeds 页面无法打开 tamper 页面,出现 500 错误. PHP message: PHP Fatal error:  Redefinition of parameter $source in /home/nginx/domains/hi.thatk.com/public/sites/all/modules/feeds_tamper/plugins/default_value.inc on line 36

补丁:

cd /path/to/sites/all/modules/commerce_feeds

wget https://www.drupal.org/files/commerce_feeds_physical_weight_and_dimensions_with_defaults_1293820-40.patch

patch –p1 < commerce_feeds_physical_weight_and_dimensions_with_defaults_1293820-40.patch

然后在feeds 的mapper页面,就能找到Dimension 和weight了

原文链接: https://www.drupal.org/node/1293820

2016-04-15_12-25-56