{"id":836,"date":"2013-11-17T12:01:59","date_gmt":"2013-11-17T08:01:59","guid":{"rendered":"http:\/\/sbbo.ru\/blog\/?p=836"},"modified":"2015-07-19T23:19:19","modified_gmt":"2015-07-19T19:19:19","slug":"addminmaxprice-to-host-cms-to-update-6-1-1","status":"publish","type":"post","link":"https:\/\/sbbo.ru\/blog\/solution\/addminmaxprice-to-host-cms-to-update-6-1-1\/","title":{"rendered":"addMinMaxPrice \u0432 Host CMS \u0434\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f 6.1.1"},"content":{"rendered":"<p>\u0412 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0432\u0447\u0435\u0440\u0430\u0448\u043d\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0431 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442 \u0441\u0435\u0431\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u0432\u0430\u0441 \u0438\u0441\u0442\u0435\u043a \u043f\u0435\u0440\u0438\u043e\u0434 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u043e 15.11.2013, \u043d\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043c\u0430\u043a\u0435\u0442\u0435 \u0441\u0430\u0439\u0442\u0430. \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d \u0441\u0430\u0439\u0442\u0430 \/ \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \/ \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0432 \u0441\u0430\u0439\u0434\u0431\u0430\u0440\u0435 \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 jQuery UI Slider? \u041f\u043e\u043b\u0437\u0443\u043d\u043e\u043a \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0446\u0435\u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430, \u043a\u0440\u043e\u043c\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 price_from \u0438 price_to \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0449\u0451 min_price \u0438 max_price. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 addMinMaxPrice, \u0430 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. <!--more--><\/p>\n<p>\u0420\u0430\u043d\u0435\u0435 \u0432 \u0444\u0438\u043b\u044c\u0442\u0440\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0440\u0443\u0431\u0440\u0438\u043a\u0430:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">$iCurrentShopGroup = intval(Core_Page::instance()-&gt;object-&gt;group);<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u0434:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">$Shop_Controller_Show\r\n\t-&gt;group($iCurrentShopGroup)\r\n\t-&gt;show();<\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\/\/ \u0423\u0437\u043d\u0430\u0435\u043c \u041c\u0410\u041a\u0421\u0418\u041c\u0410\u041b\u042c\u041d\u0423\u042e \u0446\u0435\u043d\u0443 \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \r\n$oCore_QueryBuilder_Select = Core_QueryBuilder::select('MAX(price)')-&gt;from('shop_items')\r\n\t-&gt;where('shop_group_id', '=', $iCurrentShopGroup)\r\n\t-&gt;where('active', '=', 1);\r\n$row = $oCore_QueryBuilder_Select-&gt;execute()-&gt;asAssoc()-&gt;current();\r\n$max_price = round($row[&quot;MAX(`price`)&quot;]);\r\n\r\n\/\/ \u0423\u0437\u043d\u0430\u0435\u043c \u041c\u0418\u041d\u0418\u041c\u0410\u041b\u042c\u041d\u0423\u042e \u0446\u0435\u043d\u0443 \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \r\n$oCore_QueryBuilder_Select2 = Core_QueryBuilder::select('MIN(price)')-&gt;from('shop_items')\r\n\t-&gt;where('shop_group_id', '=', $iCurrentShopGroup)\r\n\t-&gt;where('active', '=', 1);\r\n$row2 = $oCore_QueryBuilder_Select2-&gt;execute()-&gt;asAssoc()-&gt;current();\r\n$min_price = round($row2[&quot;MIN(`price`)&quot;]);\r\n\r\nif(isset($max_price) &amp;&amp; $max_price != 0) {\r\n\t$Shop_Controller_Show-&gt;addEntity(\r\n\t\tCore::factory('Core_Xml_Entity')\r\n\t\t\t-&gt;name('max_price')-&gt;value($max_price)\r\n\t);\r\n}\r\nif(isset($min_price) &amp;&amp; $min_price != 0) {\r\n\t$Shop_Controller_Show-&gt;addEntity(\r\n\t\tCore::factory('Core_Xml_Entity')\r\n\t\t\t-&gt;name('min_price')-&gt;value($min_price)\r\n\t);\r\n}<\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 XML \u0434\u043b\u044f XSL-\u0448\u0430\u0431\u043b\u043e\u043d\u0430 &#171;\u041c\u0430\u0433\u0430\u0437\u0438\u043d\u0424\u0438\u043b\u044c\u0442\u0440&#187; \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 max_price \u0438 min_price.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>\u0412 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0432\u0447\u0435\u0440\u0430\u0448\u043d\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0431 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442 \u0441\u0435\u0431\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u0432\u0430\u0441 \u0438\u0441\u0442\u0435\u043a \u043f\u0435\u0440\u0438\u043e\u0434 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u043e 15.11.2013, \u043d\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043c\u0430\u043a\u0435\u0442\u0435 \u0441\u0430\u0439\u0442\u0430. \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d \u0441\u0430\u0439\u0442\u0430 &hellip; <a href=\"https:\/\/sbbo.ru\/blog\/solution\/addminmaxprice-to-host-cms-to-update-6-1-1\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[26],"tags":[27,168],"_links":{"self":[{"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/posts\/836"}],"collection":[{"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/comments?post=836"}],"version-history":[{"count":3,"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/posts\/836\/revisions"}],"predecessor-version":[{"id":838,"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/posts\/836\/revisions\/838"}],"wp:attachment":[{"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/media?parent=836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/categories?post=836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sbbo.ru\/blog\/wp-json\/wp\/v2\/tags?post=836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}