13.10 2015

Для изменения типа ноды - модуль Node convert (поддержка VBO)

Для изменения типов товара

- Views data export + feeds

- Изменение в базе через запросы вида

UPDATE commerce_product SET type = REPLACE(type, "oldtype", "newtype");

UPDATE field_data_commerce_price SET bundle = REPLACE(bundle, "oldtype", "newtype");

UPDATE field_revision_commerce_price SET bundle = REPLACE(bundle, "oldtype", "newtype");

и т.п.

 

26.10 2014
{ "rules_update_index" : {
    "LABEL" : "update index",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "commerce", "search_api", "entity" ],
    "ON" : { "commerce_product_update" : [  ] },
    "IF" : [
      { "entity_exists" : {
          "type" : "node",
          "property" : "field_product",
          "value" : [ "commerce-product:field-product-node:0:nid" ]
        }
      }
    ],
    "DO" : [
      { "search_api_index" : { "entity" : [ "commerce-product:field-product-node:0" ] } }
    ]
  }
}

 

25.10 2014

Письма с уведомлением заказе в drupal commerce не очень информативны. Для вывода содержимого заказа и дополнительной информации можно отредактировать соответствующие правило:

1) Включить php filter (для выполнения кода в правилах)

2) Создать представление, выводящие нужные данные

3) Добавить вывод представления в отправляемом через rules письме

echo views_embed_view('views_name', $display_id = 'default', $order_id);

4) Для отображения html разметки надо подключить модули Mail System и Mime Mail / HTML mail

07.09 2014
{ "rules_disable_products" : {
    "LABEL" : "Отключаем купленные товары",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "commerce_order", "rules", "commerce_checkout" ],
    "ON" : { "commerce_checkout_complete" : [  ] },
    "IF" : [
      { "commerce_order_contains_product_type" : {
          "commerce_order" : [ "commerce_order" ],
          "product_type" : { "value" : { "product" : "product" } },
          "operator" : "\u003E=",
          "value" : "1"
        }
      }
    ],
    "DO" : [
      { "LOOP" : {