You are here

function rooms_booking_manager_update_7002 in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Sets price for ROOMS-BASIC-BOOKING to 100 (=$1).

File

modules/rooms_booking_manager/rooms_booking_manager.install, line 156
Install for Rooms Booking Manager module

Code

function rooms_booking_manager_update_7002() {
  commerce_product_types_reset();
  commerce_product_configure_product_type('rooms_product');
  $rooms_product = commerce_product_load(variable_get('rooms_booking_manager_booking_product_id', 0));
  if ($rooms_product != NULL) {
    $rooms_product->commerce_price[LANGUAGE_NONE][0]['amount'] = 100;
    $rooms_product->commerce_price[LANGUAGE_NONE][0]['currency_code'] = commerce_default_currency();
    commerce_product_save($rooms_product);
  }
}