- Posts: 3
- Thank you received: 0
Custom Field in the product list
- CreativeLounge
-
Topic Author
- Offline
Less
More
13 years 10 months ago #78873
by CreativeLounge
Custom Field in the product list was created 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
Thanking you in advance,
Andy
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78901
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom Field in the product list
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,
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.
- CreativeLounge
-
Topic Author
- Offline
Less
More
- Posts: 3
- Thank you received: 0
13 years 10 months ago #78953
by CreativeLounge
Replied by CreativeLounge on topic Custom Field in the product list
Hello Jerome,
thanks for the reply, I realise this, but how
Andy
thanks for the reply, I realise this, but how
Andy
Please Log in or Create an account to join the conversation.
13 years 10 months ago #78998
by Xavier
Replied by Xavier on topic Custom Field in the product list
Hi,
In the view "product / listing_price" (HikaShop > Display > Views) replace "echo JText::_('FREE_PRICE');" by something like:
And replace "2" by the id of your category.
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.
- CreativeLounge
-
Topic Author
- Offline
Less
More
- Posts: 3
- Thank you received: 0
13 years 10 months ago #79031
by CreativeLounge
Replied by CreativeLounge on topic Custom Field in the product list
Thanks Xavier,
still struggling to be honest!
I'll carry on trying as this has been an issue for a while now!
Thanks
Andy
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