kelevra Posted October 18, 2014 Report Share Posted October 18, 2014 Добрый день! Когда заходишь в админку в каталог товаров, справа появляется меню с фильтром по категориям, брендам и т.д. Как туда же добавить фильтр по свойствам? Вот скриншот про что я имею ввиду: Вот пример кода для бренда, может его как то можно переделать? я просто перменные и т.д не знаю все и т.д. <?php if ($_smarty_tpl->getVariable('brands')->value){?> <!-- Бренды --> <ul> <li <?php if (!$_smarty_tpl->getVariable('brand')->value->id){?>class="selected"<?php }?>><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[smarty::PLUGIN_FUNCTION]['url'][0][0]->url_modifier(array('brand_id'=>null),$_smarty_tpl);?>">Все бренды</a></li> <?php $_smarty_tpl->tpl_vars['b'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('brands')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}if ($_smarty_tpl->_count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['b']->key => $_smarty_tpl->tpl_vars['b']->value){?> <li brand_id="<?php echo $_smarty_tpl->getVariable('b')->value->id;?>" <?php if ($_smarty_tpl->getVariable('brand')->value->id==$_smarty_tpl->getVariable('b')->value->id){?>class="selected"<?php }else{ ?>class="droppable brand"<?php }?>><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[smarty::PLUGIN_FUNCTION]['url'][0][0]->url_modifier(array('keyword'=>null,'page'=>null,'brand_id'=>$_smarty_tpl->getVariable('b')->value->id),$_smarty_tpl);?>"><?php echo $_smarty_tpl->getVariable('b')->value->name;?></a></li> <?php }} ?> </ul> <!-- Бренды (The End) --> <?php }?> Quote Link to post Share on other sites
kelevra Posted October 18, 2014 Author Report Share Posted October 18, 2014 Может у кого есть какие мысли? Quote Link to post Share on other sites
Kors Posted October 18, 2014 Report Share Posted October 18, 2014 Этот функционал надо программировать. И такими простыми способами вряд ли получится...Если готовы оплачивать, обращайтесь. Quote Link to post Share on other sites
kelevra Posted October 18, 2014 Author Report Share Posted October 18, 2014 Жду ещё помощи, может кто то ещё что напишет Quote Link to post Share on other sites
Konlaz Posted October 21, 2014 Report Share Posted October 21, 2014 Жду ещё помощи, может кто то ещё что напишет Улыбнуло...)) фраза может кто то ещё что напишет...вот решил написать что то. )) Quote Link to post Share on other sites
Noxter Posted October 21, 2014 Report Share Posted October 21, 2014 Жду ещё помощи, может кто то ещё что напишетНапишу ка и я Требуемого функционала нет в админке и его нужно взять с файла view/ProductsView.php и правильно прописать в файл simpla/ProductsAdmin.php при этом немного изменив его, если Вы не знаете как это сделать то обратитесь к специалистам, тем самым сэкономив свое время. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.