Skip to main content

Custom Field in the product list

More
13 years 10 months ago #78873 by CreativeLounge
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 or Create an account to join the conversation.

More
13 years 10 months ago #78901 by Jerome
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 & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #78953 by CreativeLounge
Hello Jerome,

thanks for the reply, I realise this, but how :)

Andy

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #78998 by Xavier
Hi,

In the view "product / listing_price" (HikaShop > Display > Views) replace "echo JText::_('FREE_PRICE');" by something like:
Code:
if($this->row->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 or Create an account to join the conversation.

More
13 years 10 months ago #79031 by CreativeLounge
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 or Create an account to join the conversation.

Time to create page: 0.182 seconds
Powered by Kunena Forum