IVAN.Z 2 Posted June 2, 2020 Report Share Posted June 2, 2020 Можно как то сделать кнопку чтобы можно было редактировать кат с фронтальной части сайта на примере редактировать товар? В указанном месте ( достаточно строчки кода ) Типа этого кода {if $smarty.session.customers_status.customers_status_id == 0} {if $PRODUCTS_EDIT_LINK} <a class="btn btn-inverse" href="{$PRODUCTS_EDIT_LINK}"><i class="fa fa-pencil-alt"></i> {#text_product_edit#}</a> {/if} {/if} Link to post Share on other sites
support 447 Posted June 2, 2020 Report Share Posted June 2, 2020 54 минуты назад, ZM сказал: Можно как то сделать кнопку чтобы можно было редактировать кат с фронтальной части сайта на примере редактировать товар? В указанном месте ( достаточно строчки кода ) Типа этого кода {if $smarty.session.customers_status.customers_status_id == 0} {if $PRODUCTS_EDIT_LINK} <a class="btn btn-inverse" href="{$PRODUCTS_EDIT_LINK}"><i class="fa fa-pencil-alt"></i> {#text_product_edit#}</a> {/if} {/if} Можно. id текущей категории в переменной {$curent_category_id} Делайте ссылку что-то вроде: https://ваш-магазин.ру/admin/categories.php?cID={$current_category_id}&action=edit_category Link to post Share on other sites
IVAN.Z 2 Posted June 3, 2020 Author Report Share Posted June 3, 2020 Спасибо попробую Link to post Share on other sites
IVAN.Z 2 Posted June 3, 2020 Author Report Share Posted June 3, 2020 К сожалению не работает эта функция, кидает на создание новой или пустой кат, не подхватывает ID видимо <a class="btn btn-inverse" href="https://import.velomoto63.ru/admin/categories.php?cID={$current_category_id}&action=edit_category">edit</a> Link to post Share on other sites
support 447 Posted June 3, 2020 Report Share Posted June 3, 2020 2 часа назад, ZM сказал: К сожалению не работает эта функция, кидает на создание новой или пустой кат, не подхватывает ID видимо Попробуйте поменять {$current_category_id} на {$smarty.get.cat} Хотя первый вариант тоже должен работать, возможно, в /includes/header.php нет внизу строки: $vamTemplate->assign('current_category_id', $current_category_id); Link to post Share on other sites
IVAN.Z 2 Posted June 3, 2020 Author Report Share Posted June 3, 2020 в /includes/header.php - есть эта строчка но не тот не тот вариант не работает https://import.velomoto63.ru/index.php/cat/c405_Detskie-igry.html - тут два примера кнопки по нажатию происходит так Link to post Share on other sites
support 447 Posted June 3, 2020 Report Share Posted June 3, 2020 7 минут назад, ZM сказал: в /includes/header.php - есть эта строчка но не тот не тот вариант не работает https://import.velomoto63.ru/index.php/cat/c405_Detskie-igry.html - тут два примера кнопки по нажатию происходит так Ошибка. Правильно {$smarty.get.cat} Link to post Share on other sites
IVAN.Z 2 Posted June 3, 2020 Author Report Share Posted June 3, 2020 Не так не так https://import.velomoto63.ru/index.php/cat/c405_Detskie-igry.html <a class="btn btn-inverse" href="https://import.velomoto63.ru/admin/categories.php?cID={$current_category_id}&action=edit_category">edit current_category_id</a> <a class="btn btn-inverse" href="https://import.velomoto63.ru/admin/categories.php?cID={$smarty.get.cat}&action=edit_category">edit smarty.get.cat</a> Link to post Share on other sites
support 447 Posted June 3, 2020 Report Share Posted June 3, 2020 11 минут назад, ZM сказал: Не так не так https://import.velomoto63.ru/index.php/cat/c405_Detskie-igry.html <a class="btn btn-inverse" href="https://import.velomoto63.ru/admin/categories.php?cID={$current_category_id}&action=edit_category">edit current_category_id</a> <a class="btn btn-inverse" href="https://import.velomoto63.ru/admin/categories.php?cID={$smarty.get.cat}&action=edit_category">edit smarty.get.cat</a> Ну а если выключить опцию Короткие url в Админке - Настройки - Мета тэги. Link to post Share on other sites
IVAN.Z 2 Posted June 3, 2020 Author Report Share Posted June 3, 2020 Не помогло Link to post Share on other sites
support 447 Posted June 3, 2020 Report Share Posted June 3, 2020 1 минуту назад, ZM сказал: Не помогло Ну как не помогло, если помогло - https://import.velomoto63.ru/index.php?cat=405 Ссылки ведь поменяли после отключения этой опции. Link to post Share on other sites
IVAN.Z 2 Posted June 3, 2020 Author Report Share Posted June 3, 2020 Оу, чет в первый раз не заметил сорри, действительно. круто спасибо edit smarty.get.cat - работает Link to post Share on other sites
support 447 Posted June 3, 2020 Report Share Posted June 3, 2020 Только что, ZM сказал: Оу, чет в первый раз не заметил сорри, действительно. круто спасибо Если нужно в FAQ как раз есть вопрос как разом всем категориям, товаров красивый адрес прописать. Будет даже лучше чем с этой включённой опцией адрес. Link to post Share on other sites
IVAN.Z 2 Posted June 3, 2020 Author Report Share Posted June 3, 2020 Посмотрю спасибо Link to post Share on other sites
Recommended Posts