MR_PaveL Posted October 28, 2012 Report Share Posted October 28, 2012 Кто подскажет, как сделать краткое описание товара, например на 150 символов. Quote Link to post Share on other sites
Kosjak76 Posted October 28, 2012 Report Share Posted October 28, 2012 {$product->annotation|strip_tags|truncate:150} Quote Link to post Share on other sites
MR_PaveL Posted October 28, 2012 Author Report Share Posted October 28, 2012 Спасибо Kosjak76 попробую Quote Link to post Share on other sites
MR_PaveL Posted October 28, 2012 Author Report Share Posted October 28, 2012 Спасибо работает Quote Link to post Share on other sites
chubr Posted August 31, 2013 Report Share Posted August 31, 2013 а куда это вставлять? Quote Link to post Share on other sites
chubr Posted August 31, 2013 Report Share Posted August 31, 2013 Хочется поставить ограничение на ввод краткого описание в 150 символов при редактировании товара Quote Link to post Share on other sites
Ogybil Posted August 31, 2013 Report Share Posted August 31, 2013 "при редактировании товара" - это в админке.А здесь приводится способ обрезать длинное описание при выводе на сайте.Если надо в админке - то все иначе...Часто читаю форум, KORS -ТЫ КРАСАВЕЦ!Таких лаконичных ответов мало. Так держать! Quote Link to post Share on other sites
foy Posted January 21, 2017 Report Share Posted January 21, 2017 Подскажите пожалуйста, как ограничить в yandex.php текст аннотации ? <description>".htmlspecialchars(strip_tags($p->annotation))."</description> Quote Link to post Share on other sites
ahmed Posted January 22, 2017 Report Share Posted January 22, 2017 <description>".htmlspecialchars(substr(strip_tags($p->annotation),0,220))."</description> Quote Link to post Share on other sites
foy Posted January 22, 2017 Report Share Posted January 22, 2017 Выдает: Ошибка синтаксического анализа XML: некорректно <description>....................Именно они способствуют росту р</description> Quote Link to post Share on other sites
ahmed Posted January 22, 2017 Report Share Posted January 22, 2017 <description>".htmlspecialchars(mb_substr(strip_tags($p->annotation),0,220))."</description> Quote Link to post Share on other sites
foy Posted January 22, 2017 Report Share Posted January 22, 2017 <description>".htmlspecialchars(mb_substr(strip_tags($p->annotation),0,220))."</description> Благодарю, все получилось! 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.