test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • adjaout Friend
    #1014748

    Hi 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


    1. k2-desc
    Mr.Cat Moderator
    #1014907

    Hi @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.

    adjaout Friend
    #1015046

    Hi,

    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 Moderator
    #1015434

    Hi @adjaout,

    It’s kind of complicated so if you want to show custom fields on products, i suggest you use Ja K2 Filter.

    Regards!

    Wisdom is not a product of schooling but of the lifelong attempt to acquire it.

    Mr.Cat Moderator
    #1015807

    Hi @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 Friend
    #1028493

    Tried 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 Moderator
    #1028570

    Tried 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.

    elliotwebdesign Friend
    #1033635

    I 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

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 7 replies, has 4 voices, and was last updated by  elliotwebdesign 7 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum