[Skip to main content](#vessel-content)

Здесь вы можете свободно общаться на русском языке. Просим отнестись с пониманием к тому, что мы не разговариваем на этом языке и не можем осуществлять поддержку на нем.

#   Вывод доп. поля в карточках товаров категории

##

- **[Indira](/forum/user/35231-indira "View Indira's Profile")**
- [![Indira's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35231-indira "View Indira's Profile") Topic Author
- [ Offline](/forum/user/35231-indira)

Less More

- Posts: 14
- Thank you received: 1
-

5 years 8 months ago [\#328915](#328915) by [Indira](/forum/user/35231-indira "View Indira's Profile")  *[Вывод доп. поля в карточках товаров категории](/forum/11-russian/901789-vyvod-dop-pola-v-kartockah-tovarov-kategorii#328915 "Здравствуйте! Пытаюсь разобраться с выводом дополнительных полей и хотелось бы сделать вывод одного из них в...")* was created by *[Indira](/forum/user/35231-indira "View Indira's Profile")*

Здравствуйте! Пытаюсь разобраться с выводом дополнительных полей и хотелось бы сделать вывод одного из них в списке товаров категории.
Нашла шаблон listing_img_title.php, где можно произвести пропись доп. поля, но не могу сообразить с самим полем. Смотрю, как делается вывод других полей (в категории и карточке товара), но честно говоря, с доп полями оказалось для меня сложно ((
У меня в доп.полях в карточке товара выводится список характеристик, а среди них такие как "тематика" и тп. Я хотела доп. поле с тематикой вывести не только в карточке товара, но и в списке товаров в категории где-то над названием. Так будет уточнение или специфика товара.
Возможно уже выводили что-то подобное, а я просто не нашла на форуме... Подскажите, пожалуйста, можно ли это как-то сделать?

Я пока нашла примерно такие коды для вывода информации в шаблонах:
&lt;!-- PRODUCT CODE
&lt;span class='hikashop_product_code_list'&gt;
&lt;?php if ($this-&gt;config-&gt;get('show_code')) { ?&gt;
&lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt;
&lt;a href="&lt;?php echo $link;?&gt;"&gt;
&lt;?php }
echo $this-&gt;row-&gt;product_code;
if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt;
&lt;/a&gt;
&lt;?php } ?&gt;
&lt;?php } ?&gt;
&lt;/span&gt;
EO PRODUCT CODE --&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzExLXJ1c3NpYW4vOTAxNzg5LXZ5dm9kLWRvcC1wb2xhLXYta2FydG9ja2FoLXRvdmFyb3Yta2F0ZWdvcmlpP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[almika](/forum/user/15732-almika "View almika's Profile")**
- [![almika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar15732.png)](/forum/user/15732-almika "View almika's Profile")
- [ Offline](/forum/user/15732-almika)

Less More

- Posts: 382
- Thank you received: 77
-
-
-
-

5 years 8 months ago [\#328986](#328986) by [almika](/forum/user/15732-almika "View almika's Profile")  Replied by *[almika](/forum/user/15732-almika "View almika's Profile")* on topic *[Вывод доп. поля в карточках товаров категории](/forum/11-russian/901789-vyvod-dop-pola-v-kartockah-tovarov-kategorii#328986 "Здравствуйте! Пытаюсь разобраться с выводом дополнительных полей и хотелось бы сделать вывод одного из них в...")*

Добрый день!

Дополнительные поля можно получить из переменной $this-&gt;row-&gt;itemFields
Если у вас несколько дополнительных полей, то это будет массив
Попробуйте такие варианты:
Code:

if(isset($this-&gt;row-&gt;itemFields['your_custom_field']) &amp;&amp; !empty($this-&gt;row-&gt;itemFields['your_custom_field'])) echo $this-&gt;row-&gt;itemFields['your_custom_field']; if(isset($this-&gt;row-&gt;itemFields-&gt;your_custom_field) &amp;&amp; !empty($this-&gt;row-&gt;itemFields-&gt;your_custom_field)) echo $this-&gt;row-&gt;itemFields-&gt;your_custom_field;

your_custom_field - имя вашего дополнительного поля

Удачи

The following user(s) said Thank You: [Indira](/forum/user/35231-indira "View Indira's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzExLXJ1c3NpYW4vOTAxNzg5LXZ5dm9kLWRvcC1wb2xhLXYta2FydG9ja2FoLXRvdmFyb3Yta2F0ZWdvcmlpP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Indira](/forum/user/35231-indira "View Indira's Profile")**
- [![Indira's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35231-indira "View Indira's Profile") Topic Author
- [ Offline](/forum/user/35231-indira)

Less More

- Posts: 14
- Thank you received: 1
-

5 years 8 months ago [\#328998](#328998) by [Indira](/forum/user/35231-indira "View Indira's Profile")  Replied by *[Indira](/forum/user/35231-indira "View Indira's Profile")* on topic *[Вывод доп. поля в карточках товаров категории](/forum/11-russian/901789-vyvod-dop-pola-v-kartockah-tovarov-kategorii#328998 "Здравствуйте! Пытаюсь разобраться с выводом дополнительных полей и хотелось бы сделать вывод одного из них в...")*

Здравствуйте! Спасибо вам огромное, что откликнулись и нашли время!
Я прописала так вывод поля, правда не отобразилось. Подумала, что может дело в типе поля и попробовала вывести как текстовое поле, так и поля с чекбоксом. Но не отобразились... Поля добавлены в поле "товар".
Скажите, пожалуйста, может я что-то упускаю? В настройках полей вроде все галочки стоят, в карточке товара тоже отображается поле.

Извините, что занимаю ваше время..

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzExLXJ1c3NpYW4vOTAxNzg5LXZ5dm9kLWRvcC1wb2xhLXYta2FydG9ja2FoLXRvdmFyb3Yta2F0ZWdvcmlpP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[almika](/forum/user/15732-almika "View almika's Profile")**
- [![almika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar15732.png)](/forum/user/15732-almika "View almika's Profile")
- [ Offline](/forum/user/15732-almika)

Less More

- Posts: 382
- Thank you received: 77
-
-
-
-

5 years 8 months ago -  5 years 8 months ago [\#329003](#329003) by [almika](/forum/user/15732-almika "View almika's Profile")  Replied by *[almika](/forum/user/15732-almika "View almika's Profile")* on topic *[Вывод доп. поля в карточках товаров категории](/forum/11-russian/901789-vyvod-dop-pola-v-kartockah-tovarov-kategorii#329003 "Здравствуйте! Пытаюсь разобраться с выводом дополнительных полей и хотелось бы сделать вывод одного из них в...")*

Используйте, например,
var_dump($this-&gt;row-&gt;itemFields);
чтобы посмотреть, что там у вас с полями.

---

Дополняю

Вот в этом файле можете изучить как выводятся доп.поля
\components\com_hikashop\views\product\tmpl\show_block_custom_item.php

Last edit: 5 years 8 months ago by [almika](/forum/user/15732-almika "View almika's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzExLXJ1c3NpYW4vOTAxNzg5LXZ5dm9kLWRvcC1wb2xhLXYta2FydG9ja2FoLXRvdmFyb3Yta2F0ZWdvcmlpP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

Moderators: [progreccor](/forum/user/4816-progreccor "View progreccor's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.267 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
