Keyword

Category Ordering

  • Buddy Q
  • Buddy Q's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 2 months ago #79252 by Buddy Q
Category Ordering was created by Buddy Q
I am using menu of K2 > listitems > categoriesHowever, the ordering options are for the actual items themselves and not the categories. I have a real estate site where I want to show the category "Active Listings" always above the category "Sold Listings". However, I can't do this. There are no other category options. How can I do this until this feature can be added to a K2 upgrade? Because none of the options will be okay. Is there some hack I can use in the meantime to order the categories by the order I have the categories or ID?

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

More
15 years 2 months ago #79253 by d.k.shukla
Replied by d.k.shukla on topic Category Ordering
Hi
Category listing in K2 2.2 is working perfectly, Please select list by order during creation of category listing menu K2 » Itemlist / Category and after ward change category order as per your requirement.
It may help you

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

  • Buddy Q
  • Buddy Q's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 2 months ago #79254 by Buddy Q
Replied by Buddy Q on topic Category Ordering
d.k.shukla,

Thanks for the response. However, there is NO way to order by category during creation. The ordering is for "ITEM ORDERING".

To demonstrate, I have created this screen video of my settings and creating a new list and show you whats going on.
www.screentoaster.com/watch/stV0pSQ0ZIR19ZRlpbUltQX1Jc/k2_no_way_to_order_category

Please let me know if i'm missing something.

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

More
15 years 2 months ago #79255 by d.k.shukla
Replied by d.k.shukla on topic Category Ordering
Hi
Please refer last screen of your video, there is one column order,please change no as your desired ordering and afterward please click save icon top of order column.
It will work
Best wishes

Buddy Q said:d.k.shukla,
Thanks for the response. However, there is NO way to order by category during creation. The ordering is for "ITEM ORDERING".

To demonstrate, I have created this screen video of my settings and creating a new list and show you whats going on.
www.screentoaster.com/watch/stV0pSQ0ZIR19ZRlpbUltQX1Jc/k2_no...

Please let me know if i'm missing something.

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

  • Buddy Q
  • Buddy Q's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 2 months ago #79256 by Buddy Q
Replied by Buddy Q on topic Category Ordering
I tried what I think you are talking about. See if this i'm doing it correctly..

www.screentoaster.com/watch/stV0pSQ0ZIR19ZRlVeUl9eXlFS/k2_ordering

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

More
15 years 2 months ago #79257 by d.k.shukla
Replied by d.k.shukla on topic Category Ordering
it's ok, now you check individual category setting, set the required setting. It is better you should create a dummy category named as template to make setting easy from one place. for other categories please set inherit from template so when you will change in template category setting, same setting will be applicable to all categories.
If you have any difficulty then please send me your website back end link to troubleshoot.
With best wishes.

Buddy Q said:I tried what I think you are talking about. See if this i'm doing it correctly..
www.screentoaster.com/watch/stV0pSQ0ZIR19ZRlVeUl9eXlFS/k2_or...

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

  • Buddy Q
  • Buddy Q's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 2 months ago #79258 by Buddy Q
Replied by Buddy Q on topic Category Ordering
Okay, I think I did what you said and I still cannot get it to work. Can you see if i'm doing it right?

www.screentoaster.com/watch/stV0pSQ0ZIR19ZRlRcWVJcV1VW/k2_ordering_sub_cats

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

More
15 years 2 months ago #79259 by d.k.shukla
Replied by d.k.shukla on topic Category Ordering
Hi
looks everything fine, i will again check and let you know.Please update your k2, it will fix some bugs.

Buddy Q said:Okay, I think I did what you said and I still cannot get it to work. Can you see if i'm doing it right?
www.screentoaster.com/watch/stV0pSQ0ZIR19ZRlRcWVJcV1VW/k2_or...

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

  • Buddy Q
  • Buddy Q's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 2 months ago #79260 by Buddy Q
Replied by Buddy Q on topic Category Ordering
d.k. shukla,

I upgraded to the latest one version as you recommended. I can see where the problem is. So i've changed my menu item to only select the Master Listings category.

Category View Options of the Master Listings category I set to show. So there are different levels being shown on the page at once. You have a list of subcategories, and then you have items. You're right that I can order the list of subcategories by order. BUT I cannot list the items by their category. This is the problem. There are no options to sort the content items by category order which is exactly what I am needing. Since the client will be putting in active and sold listings in a random order, I dont know which one they will start with. This makes all the possible options unreliable when sorting the items.

"Category Item Layout", the top tab, is where the sorting needs to happen. I dont even want to show the categories above UNLESS they are able to show the items within right under it like I am wanting. For category item layout, my sorting options are:

Default - by ID I assume. Since they enter sold and active in any way they want, this won't work.
Ordering - can't feasibly order all the content pieces. This is for non-tech people with no time. Needs to be automatic.
Oldest First - Doesn't work because again entered in random order.
Most Recent First - Same as above.
title up and down - The names are addresses which have no bearing on the order. Needs to be by category.
Reverse order - Same problem as ordering problem.
Most popular - not by popularity
Highest Rated - no ratings enabled
Random Ordering - certainly don't want this

The last 3 look like new additions compared to the last version of K2. I think they need to add "By Category Alpha ASC" and "By Category Order" and "By Category Alpha DESC"

Here is a link to the page: 311addieroy.com/listings

You can see I enabled to show sub category by order. It shows only the category names and info by order. Not the category and then its items. You can see below, the items still show "Sold" being at the top even though the category order at the top is Active then Sold.

Can someone tell me how I can add this option? Is there some code I can stick in a couple of places to make this an option?

Buddy

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

More
15 years 2 months ago #79261 by d.k.shukla
Replied by d.k.shukla on topic Category Ordering
Hi
why not you tried some dedicated component for real estate listing. You will also get advanced search feature to list property. This is just my suggestion. Please have a look www.com-property.com/en/properties.html


Buddy Q said:d.k. shukla, I upgraded to the latest one version as you recommended. I can see where the problem is. So i've changed my menu item to only select the Master Listings category.

Category View Options of the Master Listings category I set to show. So there are different levels being shown on the page at once. You have a list of subcategories, and then you have items. You're right that I can order the list of subcategories by order. BUT I cannot list the items by their category. This is the problem. There are no options to sort the content items by category order which is exactly what I am needing. Since the client will be putting in active and sold listings in a random order, I dont know which one they will start with. This makes all the possible options unreliable when sorting the items.

"Category Item Layout", the top tab, is where the sorting needs to happen. I dont even want to show the categories above UNLESS they are able to show the items within right under it like I am wanting. For category item layout, my sorting options are:

Default - by ID I assume. Since they enter sold and active in any way they want, this won't work.
Ordering - can't feasibly order all the content pieces. This is for non-tech people with no time. Needs to be automatic.
Oldest First - Doesn't work because again entered in random order.
Most Recent First - Same as above.
title up and down - The names are addresses which have no bearing on the order. Needs to be by category.
Reverse order - Same problem as ordering problem.
Most popular - not by popularity
Highest Rated - no ratings enabled
Random Ordering - certainly don't want this

The last 3 look like new additions compared to the last version of K2. I think they need to add "By Category Alpha ASC" and "By Category Order" and "By Category Alpha DESC"

Here is a link to the page: 311addieroy.com/listings

You can see I enabled to show sub category by order. It shows only the category names and info by order. Not the category and then its items. You can see below, the items still show "Sold" being at the top even though the category order at the top is Active then Sold.

Can someone tell me how I can add this option? Is there some code I can stick in a couple of places to make this an option?

Buddy

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

  • Buddy Q
  • Buddy Q's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 2 months ago #79262 by Buddy Q
Replied by Buddy Q on topic Category Ordering
Thanks for the suggestion, however a component like that is over-kill since I do not need any other functionality. I think this is an opportunity to enhance the K2 component and add some sorting options that really do help make sense for flexibility in displaying content.

I am working on adding this, however, I am a noob and not so great with PHP. I have successfully added the new options via the xml files and did manage to add this:

case 'catorder':
$orderby = 'i.catid ASC';
break;
to itemlist.php which does help me. It would be great to also add something like i.catorder. 'catorder'' would need to be created which I do not know how to do.

Can you add my option to the core? Would be a nice feature.

Here is a video of my options at work: www.screentoaster.com/watch/stV0pSQ0ZIR19ZR1xdXVxeU1JQ/k2_sort_additions

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

More
15 years 2 months ago #79263 by d.k.shukla
Replied by d.k.shukla on topic Category Ordering
Hi
Sorry, I don't have good php knowledge so I will not able to help you.
Best wishes.

Buddy Q said:Thanks for the suggestion, however a component like that is over-kill since I do not need any other functionality. I think this is an opportunity to enhance the K2 component and add some sorting options that really do help make sense for flexibility in displaying content.
I am working on adding this, however, I am a noob and not so great with PHP. I have successfully added the new options via the xml files and did manage to add this:

case 'catorder':
$orderby = 'i.catid ASC';
break;
to itemlist.php which does help me. It would be great to also add something like i.catorder. 'catorder'' would need to be created which I do not know how to do.

Can you add my option to the core? Would be a nice feature.

Here is a video of my options at work: www.screentoaster.com/watch/stV0pSQ0ZIR19ZR1xdXVxeU1JQ/k2_so...

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

More
14 years 8 months ago #79264 by Jeff Lin
Replied by Jeff Lin on topic Category Ordering
Hi,

Thanks for the tips on editing com_k2/models/itemlist.php.

available fields (i.e. catid) can be found on phpMyadmin jos_k2_items table fields.
basically add the following

case '':
$orderby = 'i.';
break;

then in phpMyadmin, jos_k2_categories table > browsing
choose category > edit
field: params > change "catOrdering=" in value column
save

and it should work





Buddy Q said:Thanks for the suggestion, however a component like that is over-kill since I do not need any other functionality. I think this is an opportunity to enhance the K2 component and add some sorting options that really do help make sense for flexibility in displaying content.
I am working on adding this, however, I am a noob and not so great with PHP. I have successfully added the new options via the xml files and did manage to add this:

case 'catorder':
$orderby = 'i.catid ASC';
break;
to itemlist.php which does help me. It would be great to also add something like i.catorder. 'catorder'' would need to be created which I do not know how to do.

Can you add my option to the core? Would be a nice feature.

Here is a video of my options at work: www.screentoaster.com/watch/stV0pSQ0ZIR19ZR1xdXVxeU1JQ/k2_so...

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

More
13 years 10 months ago #79265 by russjman
Replied by russjman on topic Category Ordering
I added this ordering option to the category.xml file and the case to itemlist.php.  Shouldn't this be picked up by the Joomla admin automatically with these changes; i dont see the new ordering option i added in the dropdown list in the category admin.  Its not very user friendly to have to modify the db via phpmyadmin just to change the display order.

 

To reiterate Buddy Q, this is definitely a display option that should be included in the core.

Jeff Lin said:

Hi,
Thanks for the tips on editing com_k2/models/itemlist.php.

available fields (i.e. catid) can be found on phpMyadmin jos_k2_items table fields.
basically add the following

case '':
$orderby = 'i.';
break;

then in phpMyadmin, jos_k2_categories table > browsing
choose category > edit
field: params > change "catOrdering=" in value column
save

and it should work





Buddy Q said:
Thanks for the suggestion, however a component like that is over-kill since I do not need any other functionality. I think this is an opportunity to enhance the K2 component and add some sorting options that really do help make sense for flexibility in displaying content. I am working on adding this, however, I am a noob and not so great with PHP. I have successfully added the new options via the xml files and did manage to add this:

case 'catorder':
$orderby = 'i.catid ASC';
break;
to itemlist.php which does help me. It would be great to also add something like i.catorder. 'catorder'' would need to be created which I do not know how to do.

Can you add my option to the core? Would be a nice feature.

Here is a video of my options at work: www.screentoaster.com/watch/stV0pSQ0ZIR19ZR1xdXVxeU1JQ/k2_so...

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

More
13 years 10 months ago #79266 by stuartmarsden
Replied by stuartmarsden on topic Category Ordering
A very useful thread for me as I could not get the ordering I wanted when showing a category.  I have a small number of items and wanted them in category order first and then within that in the item order.  This is easy in standard joomla but I could not figure it out in K2.

 

I used the info here to change my itemlist.php to fit my needs and added this:

 

case 'catorder':

  $orderby = 'c.ordering, i.ordering';

  break;

 





I also tried to change the xml but it did not show up in the settings for the category meaning I will have to alter the database after any time I make a change.

 

Any solutions to this?  I would like to see this added as a standard method of ordering in future versions.

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


Powered by Kunena Forum