MrJoshMiller

Drupal Commerce Add Shipping Price to Product Price

Feb 13th, 2013
289
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. { "rules_add_shipping_price_to_product_price" : {
  2.     "LABEL" : "Add Shipping Price to Product Price",
  3.     "PLUGIN" : "reaction rule",
  4.     "REQUIRES" : [ "rules", "commerce_line_item", "commerce_product_reference" ],
  5.     "ON" : [ "commerce_product_calculate_sell_price" ],
  6.     "IF" : [
  7.       { "entity_has_field" : { "entity" : [ "commerce-line-item" ], "field" : "commerce_product" } },
  8.       { "entity_has_field" : {
  9.           "entity" : [ "commerce-line-item:commerce-product" ],
  10.           "field" : "field_shipping_price"
  11.         }
  12.       },
  13.       { "NOT data_is_empty" : { "data" : [ "commerce-line-item:commerce-product:field-shipping-price:amount" ] } }
  14.     ],
  15.     "DO" : [
  16.       { "commerce_line_item_unit_price_add" : {
  17.           "commerce_line_item" : [ "commerce_line_item" ],
  18.           "amount" : [ "commerce-line-item:commerce-product:field-shipping-price:amount" ],
  19.           "component_name" : "shipping",
  20.           "round_mode" : "1"
  21.         }
  22.       }
  23.     ]
  24.   }
  25. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×