load($product_id); $category_id = $product_nav->getCategory(); $products = &$this->getModel("products"); //Определяем сортировку и направление сортировки пользователя $mainframe =& JFactory::getApplication(); $jshopConfig = &JSFactory::getConfig(); $order = $mainframe->getUserStateFromRequest( 'jshoping.list.front.productorder', 'order', $jshopConfig->product_sorting, 'int'); $orderby = $mainframe->getUserStateFromRequest( 'jshoping.list.front.productorderby', 'orderby', $jshopConfig->product_sorting_direction, 'int'); $orderbyq = getQuerySortDirection($order, $orderby); $field_order = $jshopConfig->sorting_products_field_select[$order]; $order_query = ""; if (!$field_order) return $order_query; $order_original = $field_order; $multyCurrency = count(JSFactory::getAllCurrency()); if ($multyCurrency>1 && $field_order=="prod.product_price"){ if (strpos($adv_from,"jshopping_currencies")===false){ $adv_from .= " LEFT JOIN `#__jshopping_currencies` AS cr USING (currency_id) "; } if ($jshopConfig->product_list_show_min_price){ $field_order = "prod.min_price/cr.currency_value"; }else{ $field_order = "prod.product_price/cr.currency_value"; } } if ($field_order=="prod.product_price" && $jshopConfig->product_list_show_min_price){ $field_order = "prod.min_price"; } $order_query = " ORDER BY ".$field_order; if ($orderbyq){ $order_query .= " ".$orderbyq; } //Собственно сам запрос $db =& JFactory::getDBO(); $query = "SELECT *, `prod`.`name_ru-RU` as name FROM `#__jshopping_products` AS prod INNER JOIN `#__jshopping_products_to_categories` AS pr_cat ON `pr_cat`.`product_id` = `prod`.`product_id` LEFT JOIN `#__jshopping_categories` AS cat ON `pr_cat`.`category_id` = `cat`.`category_id` WHERE `prod`.`product_quantity`> 0 AND `prod`.`product_publish` = 1 AND `pr_cat`.`category_id` = ".$category_id." ".$order_query; $db->setQuery($query); $rows = $db->loadObjectList(); $total = Count($rows); addLinkToProducts($rows, 0, 1); $Next = false; $Prev = false; foreach($rows as $Key=>$row){ If ($row->product_id == $product_id){ if($rows[$Key + 1]->product_link) $Next=''.$rows[$Key + 1]->name.''; if($rows[$Key - 1]->product_link) $Prev=''.$rows[$Key - 1]->name.''; Break; } } ?>
#

Угловой диван Мустанг Лонг

   
51 900 ₽
Количество: 
Вид : Угловой диван
Закажите прямо сейчас
Оставьте свой телефон. Перезвоним в течении 5 минут и примем Ваш заказ!
Отзыв
Copyright MAXXmarketing GmbH
JoomShopping Download & Support