- Posts: 61
- Thank you received: 1
Change layout of pricing table, show categories
- Rusty
- Topic Author
- Offline
- Senior Member
Less
More
10 months 4 days ago #164418
by Rusty
Change layout of pricing table, show categories was created by Rusty
I need to change the way the pricing table is showing current membership available.
I am using an override for the 'pricingtablecircle' layout here: dev.barges.org/index.php?option=com_osme...cle&id=0&Itemid=1689
I need the layout to look like this:
I have categories as follows:
Single Memberships
- UK & Europe
- Rest of World
Family Memberships
- UK & Europe
- Rest of World
and then plans accordingly within those categories.
I need to know if I can output the category name in the frontend (and if so, how). I can then potentially group them based on their category.
Thanks
I am using an override for the 'pricingtablecircle' layout here: dev.barges.org/index.php?option=com_osme...cle&id=0&Itemid=1689
I need the layout to look like this:
I have categories as follows:
Single Memberships
- UK & Europe
- Rest of World
Family Memberships
- UK & Europe
- Rest of World
and then plans accordingly within those categories.
I need to know if I can output the category name in the frontend (and if so, how). I can then potentially group them based on their category.
Thanks
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 months 4 days ago #164423
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change layout of pricing table, show categories
Hi Justy
You will need to modify code in the layout file components/com_osmembership/view/common/tmpl/pricingtable_circle_plans.php to change it to meet your need
The category data is not available there, so you will need to query database. For example:
Regards,
Tuan
You will need to modify code in the layout file components/com_osmembership/view/common/tmpl/pricingtable_circle_plans.php to change it to meet your need
The category data is not available there, so you will need to query database. For example:
Code:
if ($item->category_id > 0)
{
$category = OSMembershipHelperDatabase::getCategory($item->category_id);
echo $category->title;
}
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 months 4 days ago #164424
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change layout of pricing table, show categories
Keep in mind that all the changes should be implemented using override, so you need to move that modified file to templates/template_name/html/com_osmembership/common folder so that the change won't be lost when you update to future releases of the extension
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Rusty
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 1
10 months 4 days ago - 10 months 4 days ago #164425
by Rusty
Replied by Rusty on topic Change layout of pricing table, show categories
Thanks, yes I've got them as overrides.
I've updated "html/com_osmembership/common/pricingtable_circle_plans.php", presumably I then need to update the code in "html/com_osmembership/plans/pricingtablecircle.php" ?
I've updated "html/com_osmembership/common/pricingtable_circle_plans.php", presumably I then need to update the code in "html/com_osmembership/plans/pricingtablecircle.php" ?
Last edit: 10 months 4 days ago by Rusty.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 months 4 days ago #164426
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change layout of pricing table, show categories
It's up to you. But I don't think change to html/com_osmembership/plans/pricingtablecircle.php is needed. Not sure what you want to change/add to that file?
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- Rusty
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 1
10 months 2 days ago #164499
by Rusty
Replied by Rusty on topic Change layout of pricing table, show categories
Thanks again, this is nearly working, your code is outputting the category, but I also have a parent category that I need to group them by.
The categories are as follows:
Single Memberships
- UK & Europe
- Rest of World
Family Memberships
- UK & Europe
- Rest of World
So I want to group by
First Category (first) and then second category.
Hope that makes sense. How could I do this please?
The categories are as follows:
Single Memberships
- UK & Europe
- Rest of World
Family Memberships
- UK & Europe
- Rest of World
So I want to group by
First Category (first) and then second category.
Hope that makes sense. How could I do this please?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 months 1 day ago #164514
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change layout of pricing table, show categories
Sorry but I still don't know exactly how you want to change it. If it is just output some additional information, I can guide you with basic code. But if you want to change layout structure, I'm afraid of you will need to have a developer to help you
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.