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

#   Custom Field in the product list

##

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

Less More

- Posts: 3
- Thank you received: 0
-
-

13 years 11 months ago [\#78873](#78873) by [CreativeLounge](/forum/user/5823-creativelounge "View CreativeLounge's Profile")  *[Custom Field in the product list](/forum/2-general-talk-about-hikashop/76176-custom-field-in-the-product-list#78873 "I have added a custom field for one of my categories, this is to display price ranges &quot;£1,200 to £2,400&quot; which ideally I would like to replace the price with if set to 0. Any ideas on how I can...")* was created by *[CreativeLounge](/forum/user/5823-creativelounge "View CreativeLounge's Profile")*

I have added a custom field for one of my categories, this is to display price ranges "£1,200 to £2,400" which ideally I would like to replace the price with if set to 0. Any ideas on how I can achieve this on both the flypage and the product listings. I use the listing_img_desc.php file for my listings page.

Thanking you in advance,
Andy

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#78901](#78901) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom Field in the product list](/forum/2-general-talk-about-hikashop/76176-custom-field-in-the-product-list#78901 "I have added a custom field for one of my categories, this is to display price ranges &quot;£1,200 to £2,400&quot; which ideally I would like to replace the price with if set to 0. Any ideas on how I can...")*

Hi,

A category custom field would be a little bit more complicated to retrieve but you could be possible with some view modification to have such result.
The view "list_price" display the product price in several other views (like : product listing and product page)
By modify this view, you would be able to display another text when the price is "free". There is a dedicated part in the view which display the text "FREE_PRICE".
So, you can display the content of the custom field instead of displaying the "free" text.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 3
- Thank you received: 0
-
-

13 years 11 months ago [\#78953](#78953) by [CreativeLounge](/forum/user/5823-creativelounge "View CreativeLounge's Profile")  Replied by *[CreativeLounge](/forum/user/5823-creativelounge "View CreativeLounge's Profile")* on topic *[Custom Field in the product list](/forum/2-general-talk-about-hikashop/76176-custom-field-in-the-product-list#78953 "I have added a custom field for one of my categories, this is to display price ranges &quot;£1,200 to £2,400&quot; which ideally I would like to replace the price with if set to 0. Any ideas on how I can...")*

Hello Jerome,

thanks for the reply, I realise this, but how ![:)](/media/kunena/emoticons/3.png ":)")

Andy

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

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

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#78998](#78998) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Custom Field in the product list](/forum/2-general-talk-about-hikashop/76176-custom-field-in-the-product-list#78998 "I have added a custom field for one of my categories, this is to display price ranges &quot;£1,200 to £2,400&quot; which ideally I would like to replace the price with if set to 0. Any ideas on how I can...")*

Hi,

In the view "product / listing_price" (HikaShop &gt; Display &gt; Views) replace "echo JText::_('FREE_PRICE');" by something like: Code:

if($this-&gt;row-&gt;product_category_id == '2'){ echo "£1,200 to £2,400"; else echo JText::_('FREE_PRICE');

And replace "2" by the id of your category.

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

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

Less More

- Posts: 3
- Thank you received: 0
-
-

13 years 11 months ago [\#79031](#79031) by [CreativeLounge](/forum/user/5823-creativelounge "View CreativeLounge's Profile")  Replied by *[CreativeLounge](/forum/user/5823-creativelounge "View CreativeLounge's Profile")* on topic *[Custom Field in the product list](/forum/2-general-talk-about-hikashop/76176-custom-field-in-the-product-list#79031 "I have added a custom field for one of my categories, this is to display price ranges &quot;£1,200 to £2,400&quot; which ideally I would like to replace the price with if set to 0. Any ideas on how I can...")*

Thanks Xavier,

still struggling to be honest!

I'll carry on trying as this has been an issue for a while now!

Thanks
Andy

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2MTc2LWN1c3RvbS1maWVsZC1pbi10aGUtcHJvZHVjdC1saXN0P3RtcGw9bWFya2Rvd24=) 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?

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

Time to create page: 0.050 seconds

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