я подумал, что простым совмещением виджетов поиск и категории — может получиться… но ошибся
instantcms.ru/addons/widget-filter-plus.html
В Компонент "География" добавить Улицы и каким-то образом cвязать с станциями метро.
сначала поля в фильтр вывод добавьте, потом уже фильтр облогораживайте как угодно. Есть всевозможные фильтры с автоподгрузкой и т.п. но явно Вам нужно дозаказать доработку ajax
вот в этом и вопрос — где поле "категория", например. Его нет
уже вот так
но чую, не по тому пути иду… Нужно искать в конкретной категории (указанной в соседнем слева, поле) и еще, вставить город, район
<div class="search-form-main-controls js-search-form-main-controls"> <input class="js-search-tgr" name="s_trg" value="3" type="hidden"> <input class="js-search-map" name="map" value="" type="hidden"> <input class="js-token" name="token[9789578394569]" value="4fa2ff936aae1c7e" type="hidden"> <input name="sgtd" type="hidden"> <div class="search-form__row search-form__row_1 f5GAosYEbrPc"> <div class="search-form__category"> <div class="form-select-v2"> <select id="category" name="category_id" class="js-search-form-category "> <option value="">Любая категория</option> <!-- GHS-421 --> </select> </div> </div> <div class="search-form__submit"> <input value="Найти" class="search button button-origin" type="submit"> </div> <div class="search-form__direction"> <div id="directions" class="form-select-v2 param" style="position: relative;"> <select id="directions-select" class="directions" data-filter="1"> <option data-prev-alias="metro" value="">Станция метро</option> </select> <select multiple="" class="hidden-input-for-tab" id="directions-multiple" name="metro[]" hidden="hidden"></select> <div class="select-override"></div> </div> </div> <div class="search-form__radius"> <div class="form-select-v2 js-search-form-radius hidden"> <select id="radius" class="js-search-form-radius-select" title="Радиус поиска"> <option value="0" selected=""> Радиус </option> </select> </div> </div> <div class="search-form__location"> <div class="form-select-v2"> <select id="region" name="location_id" class="js-search-form-region"> <option value="621540" data-parent-id="">По всей России</option> </select> </div> </div> <div class="search-form__key-words"> <div id="search_holder" class="search-form__key-words__search-holder"> <input id="search_greyed" value="" spellcheck="false" data-suggest="true" maxlength="100" data-suggest-delay="" class="" tabindex="-1" style="position: absolute;" autocomplete="off" type="text"> <input id="search" name="name" value="" placeholder="Поиск по объявлениям" spellcheck="false" data-suggest="true" maxlength="100" data-suggest-delay="" class="suggest_search" autocomplete="off" type="text"> </div> </div> </div> <div class="search-form__row search-form__row_2 js-pre-filters" id="pre-filters" data-delivery-categories="null" data-delivery-locations="null"> <label class="form-checkbox"> <input class="js-by-title" name="bt" type="checkbox"> <span class="form-checkbox__label">только в названиях</span> </label> <label class="form-checkbox"> <input class="js-with-images" name="i" type="checkbox"> <span class="form-checkbox__label">только с фото</span> </label> <label class="form-checkbox js-search-form-delivery hidden"> <input class="js-search-form-delivery-checkbox" name="d" type="checkbox"> <span class="form-checkbox__label"> <span class="search-form-delivery-regions"> </span>только с доставкой</span> </label> </div> </div>
в него нужно просто подставить значения
и вместо "город" — поставить страну / районы, а вместо "метро" подставить город
<div class="b-search-form b-search-form_catalog"> <form id="search_form" class="search-form__form js-search-form-catalog js-search-form" autocomplete="off" action="/search" method="post"> <div class="search-form-main-controls js-search-form-main-controls"> <div class="search-form-main-controls js-search-form-main-controls"> <input class="js-search-tgr" name="s_trg" value="3" type="hidden"> <input class="js-search-map" name="map" value="" type="hidden"> <input class="js-token" name="token[9789578394569]" value="4fa2ff936aae1c7e" type="hidden"> <input name="sgtd" type="hidden"> <div class="search-form__row search-form__row_1 f5GAosYEbrPc"> <div class="search-form__category"> <div class="form-select-v2"> <select id="category" name="category_id" class="js-search-form-category "> <option value="">Категория</option> <!-- GHS-421 --> </select> </div> </div> <div class="search-form__submit"> <input value="Найти" class="search button button-origin" type="submit"> </div> <div class="search-form__direction"> <div id="directions" class="form-select-v2 param" style="position: relative;"> <select id="directions-select" class="directions" data-filter="1"> <option data-prev-alias="region" value="">Регион</option> </select> <select multiple="" class="hidden-input-for-tab" id="directions-multiple" name="metro[]" hidden="hidden"></select> <div class="select-override"></div> </div> </div> <div class="search-form__radius"> <div class="form-select-v2 js-search-form-radius hidden"> <select id="radius" class="js-search-form-radius-select" title="Радиус поиска"> <option value="0" selected=""> Населенный пункт </option> </select> </div> </div> <div class="search-form__location"> <div class="form-select-v2"> <select id="region" name="location_id" class="js-search-form-region"> <option value="621540" data-parent-id="">Страна</option> </select> </div> </div> <div class="search-form__key-words"> <div id="search_holder" class="search-form__key-words__search-holder"> <input id="search_greyed" value="" spellcheck="false" data-suggest="true" maxlength="100" data-suggest-delay="" class="" tabindex="-1" style="position: absolute;" autocomplete="off" type="text"> <input id="search" name="name" value="" placeholder="Поиск по объявлениям" spellcheck="false" data-suggest="true" maxlength="100" data-suggest-delay="" class="suggest_search" autocomplete="off" type="text"> </div> </div> </div> <div class="search-form__row search-form__row_2 js-pre-filters" id="pre-filters" data-delivery-categories="null" data-delivery-locations="null"> <label class="form-checkbox"> <input class="js-by-title" name="bt" type="checkbox"> <span class="form-checkbox__label">только в названиях</span> </label> <label class="form-checkbox"> <input class="js-with-images" name="i" type="checkbox"> <span class="form-checkbox__label">только с фото</span> </label> <label class="form-checkbox js-search-form-delivery hidden"> <input class="js-search-form-delivery-checkbox" name="d" type="checkbox"> <span class="form-checkbox__label"> <span class="search-form-delivery-regions"> </span>только с доставкой</span> </label> </div> </div> <div class="search-form-filters-inputs js-search-form-filters-inputs"></div> </form> <div class="search-filters-wrapper js-search-filters-wrapper " data-is-filters-mount="true"></div> </div>
А вот полный css (не правленный)
/*** theme form ***/
.regions,.suggest li{position:relative}.regions-popup{width:491px}.regions-title{height:20px;font-size:14pt}.regions-location{display:-webkit-box;display:-ms-flexbox;display:flex;margin:10px 0;padding:6px 8px 10px;border:solid 10px #e1e1e1}.regions-location-list{-ms-flex-preferred-size:100%;flex-basis:100%;line-height:170%}.regions-location-list a{cursor:pointer;text-decoration:none}.regions-location-list a:hover{text-decoration:underline}.regions-action{display:-webkit-box;display:-ms-flexbox;display:flex}.regions-select{-ms-flex-preferred-size:100%;flex-basis:100%;margin-right:4px}.regions-apply{-ms-flex-negative:0;flex-shrink:0;margin:0}.suggest_search{position:relative;background:url(https://www.avito.st/s/cc/resources/325472601571.gif);width:232px;z-index:666;border-color:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}.suggest_search.loads{background:url(https://www.avito.st/s/cc/resources/63cfdb0912e5.gif) no-repeat 100% 50%}.suggest{position:absolute;min-width:450px;border:1px solid #d8d8d8!important;background-color:#fff;z-index:800}.suggest li{font-size:14px;color:#000;border:0;padding:5px 10px}.suggest li.selected{background-color:#eee!important}.suggest li span{font-weight:700}.suggest li .suggest-category{font-weight:400;color:#858585}.suggest li .suggest-category span{font-weight:400}.suggest li .suggest-category_last::after{content:'';position:absolute;left:0;right:0;bottom:0;height:1px;background-color:#ededed}.b-search-form .search-form__form{font-size:14px;margin:0;padding:0}.b-search-form .search-form__form .search-form__row_1 .form-select-v2{border:0;-webkit-box-shadow:none;box-shadow:none}.b-search-form .search-form__form .search-form__row_1 .form-select-v2 select{height:30px;line-height:30px;text-overflow:ellipsis}.b-search-form .search-form__row_1{padding:2px 3px;border-radius:2px;background:#adadad}.b-search-form .search-form__row_2{padding:5px 0 0}.b-search-form .search-form__row_2.open-filters{background:#ececec}.b-search-form .search-form__row_2 label,.b-search-form .search-form__row_2 label input,.suggest li{cursor:pointer}.b-search-form .search-form__key-words{overflow:hidden}.b-search-form .search-form__key-words__search-holder{position:relative;margin:1px 1px 1px 0;border-left:1px solid #d8d8d8;border-radius:0 3px 3px 0;background:#fff}.b-search-form .search-form__key-words input[type=text]{width:100%;height:30px;line-height:20px;border:1px solid #fff!important;border-radius:0 3px 3px 0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none}.b-search-form .search-form__key-words input::-ms-clear{display:none}.b-search-form_bx-3216{margin-left:19px;width:840px}#search,#search_greyed{background:0 0;font-family:Arial,san-serif;font-size:14px;padding-left:8px;padding-right:8px}#search_greyed{color:#adadad}#search:hover{border-color:rgba(255,176,32,.3)!important;-webkit-box-shadow:0 0 0 1px rgba(255,176,32,.3)!important;box-shadow:0 0 0 1px rgba(255,176,32,.3)!important}#search:focus,#search:focus:hover{border-radius:0;border-color:#ffb020!important;-webkit-box-shadow:0 0 0 1px #ffb020!important;box-shadow:0 0 0 1px #ffb020!important;z-index:810;outline:0}.b-search-form .search-form__key-words input::-webkit-input-placeholder{color:#c7c7c7}.b-search-form .search-form__key-words input:focus::-webkit-input-placeholder{color:transparent}.b-search-form .search-form__key-words input::-moz-placeholder{color:#c7c7c7;opacity:1}.b-search-form .search-form__key-words input:focus::-moz-placeholder{color:transparent}.b-search-form .search-form__key-words input:-ms-input-placeholder{color:#c7c7c7}.b-search-form .search-form__key-words input:focus:-ms-input-placeholder{color:transparent}.suggest{}.b-search-form .search-form__category{float:left;margin:1px 0}.b-search-form .search-form__category .form-select-v2{border-radius:2px 0 0 2px}.b-search-form .search-form__category .sub-selected{text-indent:-.8em}.macosx.firefox .b-search-form .search-form__category .sub-selected{text-indent:-.4em}#category{width:200px}.b-search-form_bx-3216 #category{width:150px}.b-search-form .search-form__location{float:right;margin:1px 1px 1px 2px;position:relative}.b-search-form .search-form__change-filters,.b-search-form .search-form__change-location{position:absolute;top:0;left:0;right:0;bottom:0;cursor:pointer;z-index:999}.b-search-form #region{width:180px}.b-search-form_bx-3216 #region{width:150px}.b-search-form .search-form__direction,.save-link_wrapper{float:right;position:relative}.b-search-form .search-form__radius{float:right}.search-form__radius .form-select-v2{margin:1px 1px 1px 2px}.b-search-form #radius{width:180px}.b-search-form_bx-3216 #radius{width:150px}.b-search-form #directions{position:relative;width:185px;margin:1px 1px 1px 2px;white-space:normal}.b-search-form #directions select.directions{width:185px}.b-search-form_bx-3216 #directions{width:150px}.b-search-form #directions .select-override{cursor:pointer}.b-search-form .search-form__submit{float:right;margin:1px 0 1px 2px}.b-search-form .search-form__submit .button{height:30px;padding:0 21px!important;border:0;border-radius:2px;font-size:14px}#pre-filters{padding:5px 7px 1px}.b-search-form_bx-3216 #pre-filters{padding:5px 0 1px}#pre-filters.pre-filters_str-category{padding-left:203px}#pre-filters.pre-filters_auto-category{padding-left:239px}#pre-filters.pre-filters_private-category{padding-left:187px}.b-search-form_catalog #pre-filters.pre-filters_auto-category,.b-search-form_item #pre-filters.pre-filters_auto-category{padding-left:440px}.b-search-form_profile-items #pre-filters.pre-filters_auto-category{padding-left:212px}#pre-filters .form-checkbox{margin-right:16px}#pre-filters .form-checkbox:last-child{margin-right:0}.b-search-form .search-filters-wrapper_hidden,.save-link,.save-link_wrapper .save-link_popup{display:none}.save-link_add .save-link[data-action=add],.save-link_del .save-link[data-action=del]{display:inline}.save-link_popup{font-size:14px;padding:0 11px 0 6px}.save-link_popup p+p{margin-top:8px}.search-form-checkboxes-only{margin-right:8px;display:inline-block}.search-form-icon-new{position:relative;top:2px}.b-search-form .form-select-v2{-webkit-box-shadow:none;box-shadow:none}.b-search-form_catalog{position:relative;padding-bottom:20px;background:#fff}.bx-2562 .b-search-form_catalog{padding-bottom:5px}.b-search-form_no-padding{padding-bottom:0}.b-search-form_item,.b-search-form_shops{position:relative;background:#fff}.b-search-form_shops{padding-bottom:15px}.b-search-form_shop{padding:10px 0}.b-search-form_auto .search-form__row_1{background:#ff6163}.b-search-form_job .search-form__row_1{background:#97cf26}.b-search-form_realty .search-form__row_1{background:#0af}.b-search-form_service .search-form__row_1{background:#a169f7}.l-search-form{margin:0 0 20px;position:relative;z-index:1000}.b-search-form #district_id,.b-search-form #metro_id{float:right;width:180px}.b-search-form input[type=text]{vertical-align:top;-webkit-box-sizing:border-box;box-sizing:border-box}.b-search-form .search:active{border-color:#c4dce7}.btn-checkbox-group input[type=checkbox]{display:none}.btn-checkbox,.btn-checkbox-group .btn-label{cursor:pointer;display:block;padding:5px 10px 4px;border:1px solid #999}.btn-checkbox{border:0;border-radius:0;float:left;margin:0;padding:0!important}.btn-checkbox-group .btn-first{border-bottom-left-radius:3px;border-top-left-radius:3px}.btn-checkbox-group .btn-last{border-bottom-right-radius:3px;border-top-right-radius:3px}.btn-checkbox-group .btn-label.active,.btn-checkbox-group .btn-label:active,.btn-checkbox-group .btn-label:focus:active,.btn-checkbox-group input[type=checkbox]:checked+.btn-label{outline:0;background:-webkit-gradient(linear,left top,left bottom,from(#da8900),to(#fde852));background:linear-gradient(to bottom,#da8900 0%,#fde852 100%)}.btn-checkbox-group input[type=checkbox]:checked+.btn-label{border:0;padding:6px 11px 4px}@media screen and (max-device-width:1024px){.b-search-form #category{width:245px}}.control-slider__labels{position:relative;height:30px;font-size:13px;line-height:15px;z-index:1}.control-slider__labels i{position:absolute;bottom:0;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}.control-slider__labels i:first-child,.control-slider__labels i:last-child{-webkit-transform:none;transform:none}.control-slider__labels i:first-child{left:0!important}.control-slider__labels i:last-child{left:auto!important;right:0}.control-slider__line{position:relative;z-index:1}.control-slider__bar-container{padding:8px 0}.control-slider__bar{position:relative;height:4px;background:#f6f6f6;-webkit-box-shadow:inset 0 0 0 1px #ddd;box-shadow:inset 0 0 0 1px #ddd;border-radius:2px}.control-slider__bar__content{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#0091d9;border-radius:inherit}.control-slider .handle{position:absolute;top:50%;left:0;width:36px;height:20px;margin:-10px 0 0;border-radius:2px;background:#fff;-webkit-box-shadow:0 1px 3px #9b9b9b;box-shadow:0 1px 3px #9b9b9b;line-height:20px;text-align:center;white-space:nowrap;cursor:pointer}.control-slider .handle::before{content:attr(data-text)}.control-slider .handle-right{left:auto;right:0}.b-param-popups.tooltip{position:absolute;left:-5000px;padding:10px 9px;background:#fff;-webkit-box-shadow:0 1px 4px 0 rgba(24,80,120,.6);box-shadow:0 1px 4px 0 rgba(24,80,120,.6);z-index:1000}.b-param-popups.tooltip.tooltip_bottom{top:30px;font-family:Arial,sans-serif}.edge .b-param-popups.tooltip,.ie .b-param-popups.tooltip{-webkit-box-shadow:0 1px 7px 0 rgba(24,80,120,.6);box-shadow:0 1px 7px 0 rgba(24,80,120,.6)}.select-override{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;background:0 0;cursor:pointer}.hidden-input-for-tab{position:absolute;left:-10000px;top:0}.popup-param .labels{margin:-2px 5px 0;font-size:14px}.popup-param .labels li{display:inline-block;margin:0 17px 9px 0}.popup-param .labels .label{position:relative}.popup-param .labels .label::after{content:attr(data-text);display:none;position:absolute;left:0;top:0;color:#000;border-bottom:0 none;font-weight:700;line-height:17px;cursor:default}.popup-param .labels .active .label,.popup-param .labels li.apply.inactive,.popup-param .labels li.apply.invisible,.popup-param .labels li.uncheck.inactive,.popup-param .labels li.uncheck.invisible{visibility:hidden}.popup-param .labels .active .label::after{display:block;visibility:visible}.ie11 .popup-param .labels .label::after{position:static}.ie11 .popup-param .labels .active .label{visibility:visible;display:inline-block;line-height:0;text-indent:-9999px;border:0}.ie11 .popup-param .labels .active .label::after{text-indent:0;line-height:initial}.popup-param .labels.hidden-labels .active{display:none}.popup-param .labels li.apply,.popup-param .labels li.uncheck{float:right;margin-top:1px;font-size:13px}.popup-param .labels li.apply{margin-right:10px}.popup-param .labels li.uncheck{margin-right:0}.popup-param .tab-container{white-space:nowrap;font-size:0}.popup-param .tab-container-with-map{width:944px}.popup-param .tab{display:inline-block;overflow-y:auto;overflow-x:hidden;max-height:310px;background-attachment:local,scroll;background-clip:border-box,border-box;background-color:transparent;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),to(rgba(255,255,255,0))),radial-gradient(farthest-side at 50% 0%,rgba(0,0,0,.3),transparent);background-image:linear-gradient(#fff 20%,rgba(255,255,255,0)),radial-gradient(farthest-side at 50% 0%,rgba(0,0,0,.3),transparent);background-origin:padding-box,padding-box;background-position:0 0,0 0;background-repeat:no-repeat;background-size:100% 23px,100% 7px}.popup-param .tab.inactive{width:0!important;height:0!important;display:block}.ipad .popup-param .tab.inactive{width:1px!important;height:0!important}.popup-param .tab.max-height-none{max-height:none}.popup-param .tab-col{display:inline-block;min-width:114px;margin-right:20px;vertical-align:top}.popup-param .many-cols .tab-col{min-width:0}.popup-param .tab label{display:block;margin:-2px 5px 0 0;padding-left:5px;white-space:nowrap;overflow:hidden;font-size:13px;line-height:25px}.popup-param[data-name=directions-select] .tab-col{min-width:142px}.search-form-delivery-regions{background-image:url(https://www.avito.st/s/cc/resources/05932b9c8130.svg);background-repeat:no-repeat;background-size:contain;background-position:0 3px;width:20px;display:inline-block;margin-left:-6px}
/*** theme form ***/
и выглядит это все дело так:
<?php $this->addJS($this->getJavascriptFileName('jquery-chosen')); $this->addCSS($this->getTemplateStylesFileName('jquery-chosen')); if(!$cats){ return false; } foreach($cats as $cat){ if ($cat['ns_level'] > 1){ } $cats_list[$cat['slug']] = $cat['title']; } if(!$cats_list){ return false; } ?> <div class="b-search-form b-search-form_catalog"> <form id="search_form" class="search-form__form js-search-form-catalog js-search-form" autocomplete="off" action="/search" method="post"> <div class="search-form-main-controls js-search-form-main-controls"> <div class="search-form-main-controls js-search-form-main-controls"> <input class="js-search-tgr" name="s_trg" value="3" type="hidden"> <input class="js-search-map" name="map" value="" type="hidden"> <input class="js-token" name="token[9789578394569]" value="4fa2ff936aae1c7e" type="hidden"> <input name="sgtd" type="hidden"> <div class="search-form__row search-form__row_1 f5GAosYEbrPc"> <div class="search-form__category"> <div class="form-select-v2"> <div id="category" name="category_id" class="field ft_category_id"> <?php echo html_select('category_id', $cats_list, $active_cat['slug'], array('id'=>'ft_category_id')); ?> </div> </div> </div> <div class="search-form__submit"> <input value="Найти" class="search button button-origin" type="submit"> </div> <div class="search-form__direction"> <div id="directions" class="form-select-v2 param" style="position: relative;"> <select id="directions-select" class="directions" data-filter="1"> <option data-prev-alias="region" value="">Регион</option> </select> <select multiple="" class="hidden-input-for-tab" id="directions-multiple" name="metro[]" hidden="hidden"></select> <div class="select-override"></div> </div> </div> <div class="search-form__radius"> <div class="form-select-v2 js-search-form-radius hidden"> <select id="radius" class="js-search-form-radius-select" title="Радиус поиска"> <option value="0" selected=""> Населенный пункт </option> </select> </div> </div> <div class="search-form__location"> <div class="form-select-v2"> <select id="region" name="location_id" class="js-search-form-region"> <option value="621540" data-parent-id="">Страна</option> </select> </div> </div> <div class="search-form__key-words"> <div id="search_holder" class="search-form__key-words__search-holder"> <input id="search_greyed" value="" spellcheck="false" data-suggest="true" maxlength="100" data-suggest-delay="" class="" tabindex="-1" style="position: absolute;" autocomplete="off" type="text"> <input id="search" name="name" value="" placeholder="Поиск по объявлениям" spellcheck="false" data-suggest="true" maxlength="100" data-suggest-delay="" class="suggest_search" autocomplete="off" type="text"> </div> </div> </div> <div class="search-form__row search-form__row_2 js-pre-filters" id="pre-filters" data-delivery-categories="null" data-delivery-locations="null"> <label class="form-checkbox"> <input class="js-by-title" name="bt" type="checkbox"> <span class="form-checkbox__label">только в названиях</span> </label> <label class="form-checkbox"> <input class="js-with-images" name="i" type="checkbox"> <span class="form-checkbox__label">только с фото</span> </label> <label class="form-checkbox js-search-form-delivery hidden"> <input class="js-search-form-delivery-checkbox" name="d" type="checkbox"> <span class="form-checkbox__label"> <span class="search-form-delivery-regions"> </span>только с доставкой</span> </label> </div> </div> <div class="search-form-filters-inputs js-search-form-filters-inputs"></div> </form> <div class="search-filters-wrapper js-search-filters-wrapper " data-is-filters-mount="true"></div> </div> <BR><BR><BR><BR> <div class="fields"> <div id="category_select_<?php echo $widget->id; ?>" class="field ft_category_id"> <?php echo html_select('category_id', $cats_list, $active_cat['slug'], array('id'=>'ft_category_id')); ?> </div> <form action="/search" method="GET"> <input type="hidden" name="view" value="search" /> <span name="gosearch" class="gosearch dt-i-search"></span> <input type="text" name="q" value="<?php echo LANG_DEZZO_SITE_SEARCH; ?>" onClick="this.value=''" onFocusOut="if(this.value==''){this.value='<?php echo LANG_DEZZO_SITE_SEARCH; ?>';}" /> </form> </div> <script> $(function (){ $('#ft_category_id','#category_select_<?php echo $widget->id; ?>').chosen({no_results_text: '<?php echo LANG_LIST_EMPTY; ?>', placeholder_text_single: '<?php echo LANG_SELECT; ?>', placeholder_text_multiple: '<?php echo LANG_SELECT_MULTIPLE; ?>', disable_search_threshold: 8, width: '25%', allow_single_deselect: true, search_placeholder: '<?php echo LANG_BEGIN_TYPING; ?>', search_contains: true, hide_results_on_select: false}); $('#ft_category_id','#category_select_<?php echo $widget->id; ?>').chosen().change(function(e){ if($(this).val() == 0){ window.location = '/<?php echo $ctype_name; ?>'; }else{ window.location = '/<?php echo $ctype_name; ?>/'+$(this).val(); } }); }); </script>
Пока не знаю, как добавить город, район, страну
В расширенной доске есть виджеты регион-город. Автор может смог бы чем-нибудь помочь...как добавить город, район, страну
думаю еще, что делать с новым виджетом… я в ступоре )
В расширенной доске есть виджеты регион-город. Автор может смог бы чем-нибудь помочь...
Есть, но он и в стандартной есть — только вывод нужно поменять, сделать как у категорий
<div id="category" name="category_id" class="field ft_category_id"> <?php echo html_select('category_id', $cats_list, $active_cat['slug'], array('id'=>'ft_category_id')); ?> </div>
этот запрос нужно переделать, чтобы получать список регионов (как это в фильтре реализовано)
Может и ошибаюсь, но мне кажется, что форумы больше для личных нужд а магазины для клиентских. Вывод, инстант используется больше для личных нужд, а клиентам можно повесить опенкарты и ко.