Ejemplo n.º 1
0
 /**
  * Collect all data to show on the template
  *
  * @author RolandD, Max Milbers
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $session = JFactory::getSession();
     $virtuemart_price_id = $session->get('virtuemart_price_id', 0);
     $booking_date = $input->getString('booking_date', '');
     $privategrouptrip_model = tmsModel::getModel('privategrouptrip');
     $item_private_group_trip = $privategrouptrip_model->getData($virtuemart_price_id);
     $virtuemart_product_id = $item_private_group_trip->virtuemart_product_id;
     $input->set('virtuemart_product_id', $virtuemart_product_id);
     $privategrouptrip_model->setState('filter.virtuemart_price_id', $virtuemart_price_id);
     $this->privategrouptrip = reset($privategrouptrip_model->getItems());
     $this->privategrouptrip->allow_passenger = 'infant,child_1,child_2,teen,adult,senior';
     $this->privategrouptrip->departure_date = $booking_date;
     $product_model = tmsModel::getModel('product');
     $this->product = $product_model->getItem($this->privategrouptrip->virtuemart_product_id);
     require_once JPATH_ROOT . '/components/com_virtuemart/helpers/vmjointgroup.php';
     $this->rooming_select_type = Vmjointgroup::get_list_rooming_type();
     require_once JPATH_ROOT . '/libraries/php-loremipsum-master/src/LoremIpsum.php';
     $this->lipsum = new joshtronic\LoremIpsum();
     require_once JPATH_ROOT . '/administrator/components/com_virtuemart/helpers/tsmtransferaddon.php';
     $transfer_addon_model = tmsModel::getModel('transferaddon');
     require_once JPATH_ROOT . '/libraries/upgradephp-19/upgrade.php';
     $this->pre_transfer_item = $transfer_addon_model->getItem(12);
     $this->pre_transfer_item->data_price = base64_decode($this->pre_transfer_item->data_price);
     $this->pre_transfer_item->data_price = up_json_decode($this->pre_transfer_item->data_price, false, 512, JSON_PARSE_JAVASCRIPT);
     $this->pre_transfer_item->sale_price = $this->pre_transfer_item->data_price->item_flat->net_price;
     $this->post_transfer_item = clone $transfer_addon_model->getItem(14);
     $this->post_transfer_item->data_price = base64_decode($this->post_transfer_item->data_price);
     $this->post_transfer_item->data_price = up_json_decode($this->post_transfer_item->data_price, false, 512, JSON_PARSE_JAVASCRIPT);
     $this->post_transfer_item->asale_price = $this->post_transfer_item->data_price->item_flat->net_price;
     $hotel_addon_model = tmsModel::getModel('hoteladdon');
     require_once JPATH_ROOT . '/libraries/upgradephp-19/upgrade.php';
     $this->pre_night_item = $hotel_addon_model->getItem(14);
     $this->pre_night_item->data_price = base64_decode($this->pre_night_item->data_price);
     $this->pre_night_item->data_price = up_json_decode($this->pre_night_item->data_price, false, 512, JSON_PARSE_JAVASCRIPT);
     $this->pre_night_item->sale_price = $this->pre_night_item->data_price->item_flat->net_price;
     $this->post_night_item = clone $hotel_addon_model->getItem(15);
     $this->post_night_item->data_price = base64_decode($this->post_night_item->data_price);
     $this->post_night_item->data_price = up_json_decode($this->post_night_item->data_price, false, 512, JSON_PARSE_JAVASCRIPT);
     $this->post_night_item->asale_price = $this->post_transfer_item->data_price->item_flat->net_price;
     $transfer_excursion_addon = tmsModel::getModel('excursionaddon');
     $this->list_excursion_addon = $transfer_excursion_addon->getItemList();
     parent::display($tpl);
 }
Ejemplo n.º 2
0
 /**
  * Collect all data to show on the template
  *
  * @author RolandD, Max Milbers
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $virtuemart_departure_id = $input->getInt('virtuemart_departure_id', 0);
     $jontgrouptrip_model = tmsModel::getModel('jontgrouptrip');
     $item_departure = $jontgrouptrip_model->getData($virtuemart_departure_id);
     $virtuemart_product_id = $item_departure->virtuemart_product_id;
     $input->set('virtuemart_product_id', $virtuemart_product_id);
     $jontgrouptrip_model->setState('filter.virtuemart_departure_id', $virtuemart_departure_id);
     $this->depatrure = reset($jontgrouptrip_model->getItems());
     $product_model = tmsModel::getModel('product');
     $this->product = $product_model->getItem($this->depatrure->virtuemart_product_id);
     require_once JPATH_ROOT . '/components/com_virtuemart/helpers/vmjointgroup.php';
     $this->rooming_select = Vmjointgroup::get_list_rooming();
     require_once JPATH_ROOT . '/libraries/php-loremipsum-master/src/LoremIpsum.php';
     $this->lipsum = new joshtronic\LoremIpsum();
     parent::display($tpl);
 }
Ejemplo n.º 3
0
 /**
  * Collect all data to show on the template
  *
  * @author RolandD, Max Milbers
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $session = JFactory::getSession();
     $virtuemart_price_id = $session->get('virtuemart_price_id', 0);
     $booking_date = $input->getString('booking_date', '');
     $privategrouptrip_model = tmsModel::getModel('privategrouptrip');
     $item_private_group_trip = $privategrouptrip_model->getData($virtuemart_price_id);
     $virtuemart_product_id = $item_private_group_trip->virtuemart_product_id;
     $input->set('virtuemart_product_id', $virtuemart_product_id);
     $privategrouptrip_model->setState('filter.virtuemart_price_id', $virtuemart_price_id);
     $this->privategrouptrip = reset($privategrouptrip_model->getItems());
     $this->privategrouptrip->allow_passenger = 'infant,child_1,child_2,teen,adult,senior';
     $this->privategrouptrip->departure_date = $booking_date;
     $product_model = tmsModel::getModel('product');
     $this->product = $product_model->getItem($this->privategrouptrip->virtuemart_product_id);
     require_once JPATH_ROOT . '/components/com_virtuemart/helpers/vmjointgroup.php';
     $this->rooming_select = Vmjointgroup::get_list_rooming();
     require_once JPATH_ROOT . '/libraries/php-loremipsum-master/src/LoremIpsum.php';
     $this->lipsum = new joshtronic\LoremIpsum();
     parent::display($tpl);
 }