-
AuthorPosts
-
adjaout Friend
adjaout
- Join date:
- February 2017
- Posts:
- 21
- Downloads:
- 81
- Uploads:
- 7
- Thanks:
- 2
- Thanked:
- 2 times in 2 posts
March 2, 2017 at 12:48 pm #1014748Hi again,
I want to display the description of my K2 product in the filter page (like on the image bellow), is there an easy way to do that in the code or directly in the admin page ?
Btw, it’s seems like i need to save my filter every time i create a new product in K2, is that normal ? Is there a fix for that ?
Best regards
Mr.Cat ModeratorMr.Cat
- Join date:
- December 2016
- Posts:
- 270
- Downloads:
- 24
- Uploads:
- 69
- Thanks:
- 58
- Thanked:
- 53 times in 50 posts
March 3, 2017 at 2:15 am #1014907Hi @adjaout,
It’s possible to show product description on filterpage. (Beware of too many products on category, it’ll cause slow load.)
First, go to file /plugins/jamegafilter/k2/helper.php. Put this code to line number 76
$item->desc = $baseItem->introtext.$baseItem->fulltext;
Go to file /plugins/jamegafilter/k2/layouts/default/product-item.php. Put this code to anywhere you want.
{desc|s}
Then go backend, save or index the filter page again. You’ll see the change.
And yes, everytime you create new or modify k2 item, you must re-index data to see new result.That’s how megafilter works.
Regards!
Wisdom is not a product of schooling but of the lifelong attempt to acquire it.
1 user says Thank You to Mr.Cat for this useful post
adjaout Friendadjaout
- Join date:
- February 2017
- Posts:
- 21
- Downloads:
- 81
- Uploads:
- 7
- Thanks:
- 2
- Thanked:
- 2 times in 2 posts
March 3, 2017 at 8:25 am #1015046Hi,
Nice, works like a charm, thanks !
Now, is there a way to choose to display only some custom fields that i have in my products ? or at least all of them ?
Thanks for your help
Mr.Cat ModeratorMr.Cat
- Join date:
- December 2016
- Posts:
- 270
- Downloads:
- 24
- Uploads:
- 69
- Thanks:
- 58
- Thanked:
- 53 times in 50 posts
Mr.Cat ModeratorMr.Cat
- Join date:
- December 2016
- Posts:
- 270
- Downloads:
- 24
- Uploads:
- 69
- Thanks:
- 58
- Thanked:
- 53 times in 50 posts
March 7, 2017 at 1:51 am #1015807Hi @adjaout,
Here is the way to show certain custom fields.
Make sure that you know the custom field id you want to show. (You can get it in /administrator/index.php?option=com_k2&view=extrafields)
Replace [id] with your custom field id in the code below.
{attr.ct[id].value|s}
Then go to file /plugins/jamegafilter/k2/layouts/default/product-item.php. Put the code after replacing to anywhere you want.
Regards.
Wisdom is not a product of schooling but of the lifelong attempt to acquire it.
abfilm Friendabfilm
- Join date:
- March 2014
- Posts:
- 30
- Downloads:
- 22
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
April 24, 2017 at 1:56 pm #1028493Tried this "$item->desc = $baseItem->introtext.$baseItem->fulltext;" but only got the full text, need to get the intro text, how do i do this ?
Mr.Cat ModeratorMr.Cat
- Join date:
- December 2016
- Posts:
- 270
- Downloads:
- 24
- Uploads:
- 69
- Thanks:
- 58
- Thanked:
- 53 times in 50 posts
April 25, 2017 at 1:37 am #1028570Tried this "$item->desc = $baseItem->introtext.$baseItem->fulltext;" but only got the full text, need to get the intro text, how do i do this ?
Just change that line to this 🙂
$item->desc = $baseItem->introtext;
Regards
Wisdom is not a product of schooling but of the lifelong attempt to acquire it.
May 12, 2017 at 7:51 pm #1033635I tried that and nothing is showing up.
Ant ideas?
Do i have to hack the helper.php too or just the code in product-item.php?
I meant for the custom fields
AuthorPostsViewing 8 posts - 1 through 8 (of 8 total)This topic contains 7 replies, has 4 voices, and was last updated by elliotwebdesign 7 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Description in product filter ?
Viewing 8 posts - 1 through 8 (of 8 total)