28.12 2015
function mymodule_form_commerce_cart_add_to_cart_form_alter(&$form, &$form_state, $form_id) {
  $form['quantity']['#title_display'] = 'invisible';
}
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" : {
08.08 2014
/**
 * Implements hook_form_FORM_ID_alter()
 *
 * Hide single value attributes from the add-to-cart form
 **/
function YOUR_MODULE_form_commerce_cart_add_to_cart_form_alter(&$form, &$form_state, $form_id) {
    if (isset($form["attributes"])) {
        foreach ($form["attributes"] as $key => $value) {
            if (substr($key, 0, 6) == "field_" && isset($value["#options"])
                && sizeof($value["#options"]) == 1) {
                hide($form["attributes"][$key]);
            }
        }
    }
19.07 2014

https://www.drupal.org/node/1301570

В настройках правила добавляется возможность выбора способа передачи информации о заказе при оплате через PayPal.

commerce_paypal.zip