<?php /** * @package E-Commerce WD * @author Web-Dorado * @copyright (C) 2014 Web-Dorado. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ defined('_JEXEC') || die('Access Denied'); WDFHelper::add_css('css/' . WDFInput::get_controller() . '/' . $this->_layout . '.css'); WDFHelper::add_script('js/' . WDFInput::get_controller() . '/' . $this->_layout . '.js'); $options = $this->options; $final_checkout_data = $this->final_checkout_data; $products_data = $final_checkout_data['products_data']; $total_price_text = $final_checkout_data['total_price_text']; $payment_buttons_data = $this->payment_buttons_data; $pager_data = $this->pager_data; WDFDocument::set_title(WDFText::get('CHECKOUT')); ?> <form name="wd_shop_main_form" action="" method="POST"> </form> <div class="container"> <div class="row"> <div class="col-sm-12"> <!-- panel --> <div class="wd_shop_panel_user_data panel panel-default"> <div class="panel-body"> <h2 class="wd_shop_header"> <?php
public function get_row() { $db = JFactory::getDbo(); if (WDFInput::get('type')) { $id = WDFInput::get('id'); } else { $id = WDFInput::get('category_id', WDFParams::get('category_id', 0, 'int')); } $row = WDFDb::get_row('categories', array($db->quoteName('id') . ' = ' . $id, $db->quoteName('published') . ' = 1')); if ($row->id == 0) { $row->id = 0; $row->name = JText::_('root'); } // additional data // path categories $row->path_categories = $this->get_category_path_categories($row->id); // info if (WDFInput::get('type')) { $row->show_info = WDFInput::get('show_info'); } else { $row->show_info = WDFParams::get('show_info', 1); } // image if ($row->images != null) { $images = WDFJson::decode($row->images); $row->image = empty($images) == false ? $images[0] : ''; } else { $row->image = ''; } // subcategories if (WDFInput::get('type')) { $row->show_subcategories = WDFInput::get('show_subcategories'); } else { $row->show_subcategories = WDFParams::get('show_subcategories', 1); } if (WDFInput::get('type')) { $row->subcategories_cols = WDFInput::get('number_columns'); } else { $row->subcategories_cols = WDFParams::get('subcategories_cols', 1); } $subcategories = $this->get_category_subcategories($row->id); if ($subcategories === false) { WDFHelper::redirect('systempages', 'displayerror', '', 'code=2'); } $row->subcategories = $subcategories; if (empty($row->subcategories) == true) { $row->show_subcategories = 0; } // category tree if (WDFInput::get('type')) { $row->show_tree = WDFInput::get('show_path'); } else { $row->show_tree = WDFParams::get('show_tree', 1); } // products and count if (WDFInput::get('type')) { $row->show_products = WDFInput::get('show_products'); } else { $row->show_products = WDFParams::get('show_products', 1); } if (WDFInput::get('type')) { $row->products_count = WDFInput::get('products_count'); } else { $row->products_count = WDFParams::get('products_count'); } $row->products = array(); if ($row->show_products == 1) { $products = $this->get_category_products($row->id, $row->products_count); if ($products === false) { WDFHelper::redirect('systempages', 'displayerror', '', 'code=2'); } $row->products = $products; } if (empty($row->products) == true) { $row->show_products = 0; } // url view products $row->url_view_products = JRoute::_('index.php?option=com_' . WDFHelper::get_com_name() . '&controller=products&task=displayproducts&search_category_id=' . $row->id); return $row; }
private function add_product_rows_query_where_filter_tags(JDatabaseQuery $query) { $db = JFactory::getDbo(); $model_options = WDFHelper::get_model('options'); $options = $model_options->get_options(); $filters_data = $this->get_filters_data(); $module_filters = WDFInput::get('module_filters'); if ($options->search_enable_search == 1 && $options->filter_tags == 1 || $module_filters == 1) { foreach ($filters_data['tags'] as $tag_name) { $query->where('T_PRODUCT_TAGS.tag_names LIKE ' . $db->quote('%,' . $tag_name . ',%')); } } return $query; }
public function ajax_getcompareproductrow() { WDFInput::set('tmpl', 'component'); $model = WDFHelper::get_model('products'); $product_row = $model->get_product_view_product_row(); echo WDFJson::encode($product_row); die; }