kotkotan Posted June 11, 2013 Posted June 11, 2013 (edited) Подскажите пожалуйста, как доработать стандартный модуль, чтобы во вкладке "Комментарии" появилось количество комментариев (отзывов), оставленных по поводу товара? Edited June 11, 2013 by kotkotan (see edit history) Share this post Link to post Share on other sites More sharing options...
absent Posted June 11, 2013 Posted June 11, 2013 дописать sql запрос с COUNT вычислить колличество. Share this post Link to post Share on other sites More sharing options...
absent Posted June 11, 2013 Posted June 11, 2013 (edited) Либо попробуй {$array|@count} Вместо $array массив с коментариями Или count($array) Edited June 11, 2013 by absent (see edit history) Share this post Link to post Share on other sites More sharing options...
kotkotan Posted June 11, 2013 Posted June 11, 2013 а можно чуть подробнее...спасибо Share this post Link to post Share on other sites More sharing options...
absent Posted June 11, 2013 Posted June 11, 2013 tab.tpl в папке productcomments <li><a href="#idTab5" class="idTabHrefShort">{l s='Comments' mod='productcomments'}({$comments|@count})</a></li> это вставь вместо того что есть 1 Share this post Link to post Share on other sites More sharing options...
kotkotan Posted June 11, 2013 Posted June 11, 2013 (edited) tab.tpl в папке productcomments <li><a href="#idTab5" class="idTabHrefShort">{l s='Comments' mod='productcomments'}({$comments|@count})</a></li> это вставь вместо того что есть супер. работает. спасибо. немного исправил код, чтобы вместо "Комментарии" было написано "Отзывы" и был пробел между текстом и количеством отзывов. <li><a href="#idTab5" class="idTabHrefShort">{l s='Отзывы' mod='productcomments'} ({$comments|@count})</a></li> еще раз спасибо.! Edited June 11, 2013 by kotkotan (see edit history) Share this post Link to post Share on other sites More sharing options...
kotkotan Posted June 11, 2013 Posted June 11, 2013 только не пойму, почему после одного отзыва нет возможности добавить другой, третий и т.д.... нет кнопки "Добавить комментарий" .. ? Share this post Link to post Share on other sites More sharing options...
absent Posted June 11, 2013 Posted June 11, 2013 1 клиент - один отзыв Share this post Link to post Share on other sites More sharing options...
kotkotan Posted June 11, 2013 Posted June 11, 2013 1 клиент - один отзыв понял, спасибо. подскажите еще как переименовать "Класс" (который стоит рядом со звездочками) скажем в "Оценка". Переименование Grade в productcomments.tpl результатов не дает Share this post Link to post Share on other sites More sharing options...
absent Posted June 11, 2013 Posted June 11, 2013 не понял Share this post Link to post Share on other sites More sharing options...
kotkotan Posted June 12, 2013 Posted June 12, 2013 (edited) не понял выкладываю скрин. не могу переименовать "Класс" в "Оценка" и кнопка оставить комментарий на другом компьютере так и не появилась, после добавления первого коммента, т.е. получается что комментарий к одному товару может оставить в принципе один человек. Edited June 12, 2013 by kotkotan (see edit history) Share this post Link to post Share on other sites More sharing options...
kotkotan Posted June 12, 2013 Posted June 12, 2013 не понял выкладываю скрин. не могу переименовать "Класс" в "Оценка" и кнопка оставить комментарий на другом компьютере так и не появилась, после добавления первого коммента.... Share this post Link to post Share on other sites More sharing options...
absent Posted June 12, 2013 Posted June 12, 2013 в переводе модуля Share this post Link to post Share on other sites More sharing options...
kotkotan Posted June 12, 2013 Posted June 12, 2013 в переводе модуля с переводом разобрался, а не подскажите почему не получается оставлять еще комментарии, пробовал с разных компов с разных IP... Share this post Link to post Share on other sites More sharing options...
absent Posted June 12, 2013 Posted June 12, 2013 так задумано) Share this post Link to post Share on other sites More sharing options...
kotkotan Posted June 12, 2013 Posted June 12, 2013 так задумано) тоска.... в чем смыл тогда этих комментариев, если можно оставить только один и все.... бред какой-то.. Share this post Link to post Share on other sites More sharing options...
absent Posted June 12, 2013 Posted June 12, 2013 ну в коде порой и можно сделать много Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now