VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: MarioP on November 15, 2013, 16:33:33 PM

Title: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: MarioP on November 15, 2013, 16:33:33 PM
Hello.
I have a problem with VM home page and categories layout. More specifically with order of the categories. In VM 2.0.24 they were displaying as they should be ( I guess ordering depends on manual settings saved in VM backend ->Product categories) Now the categories are displaying alphabetized...Is there any option to change this?
Did manual ordering stop to work? Please help!
Joomla! 2.5.16
VM. 2.0.24a

Maybe someone could indicate me the files which can affect the categories sort order...I'll try to replace it with those from VM 2.0.24...
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 15, 2013, 20:40:03 PM
I added this to the live update information. Just go to your vm configuration and set the default ordering of your categories/products
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: MarioP on November 15, 2013, 20:47:45 PM
Sorry, but I don't understand..
QuoteJust go to your vm configuration and set the default ordering of your categories/products
Here we can only set ascending or descending sorting, but how about the manual sorting?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: wicko on November 15, 2013, 21:38:59 PM
In the 'configuration' page and 'product ordering setting' tab I have tried to set the 'default category sort order' to 'Ordering'. But this is still leaving my categories in Alphabetical order. The Ascending and Descending works but the ordering drop down has no effect.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: MarioP on November 15, 2013, 22:53:09 PM
I can confirm what wico wrote. There's a bug. We have no results if we set the ''Deafult category order' to 'odering'. Categories layout still remains in alphabetized order.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: antonino78 on November 16, 2013, 13:16:18 PM
I also have the same problem for sorting categories
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 16, 2013, 17:33:49 PM
Please use this attachment,
the structure is like your joomla, just extract it directly into your root folder. It should overwrite the config and category model and parts of the config view.

[attachment cleanup by admin]
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: MarioP on November 16, 2013, 17:50:23 PM
Thank you very much for your help. Problem seems to be resolved!
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: wicko on November 17, 2013, 11:17:33 AM
Great this works for me.

Thank you
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: BaidareW on November 17, 2013, 13:13:15 PM
Great to get quick response.

It is strange how many times we had sorting problems in VM 2.x
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 17, 2013, 13:31:47 PM
The problem arised, because I cache the function now. Another problem was that I had to change the ordering for products again. Just because some of the ordering fields did not work with SEF and ULR rewriting. Without rewriting it worked, hmpf. The combination of this leaded to that, imho.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Farshad88 on November 17, 2013, 18:23:54 PM
Quote from: Milbo on November 16, 2013, 17:33:49 PM
Please use this attachment,
the structure is like your joomla, just extract it directly into your root folder. It should overwrite the config and category model and parts of the config view.

Not work for the Cyrillic alphabet. :(
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 17, 2013, 19:50:35 PM
This is a mysql database probem then. Check your database please and what is not working? ordering or names?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Farshad88 on November 17, 2013, 20:16:21 PM
After upgrade to 2.0.24a categories are sorted only in alphabetical name [Cyrillic alphabet]. I try your patch but nothing has changed. I change the order but when I open site I see categories are sorted only in alphabetical name.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: inu2005 on November 18, 2013, 01:44:38 AM
QuotePlease use this attachment,
the structure is like your joomla, just extract it directly into your root folder. It should overwrite the config and category model and parts of the config view.

I used the attachment and my manual order of the categories is back (no longer alphabetical which occured after the 2.0.24a update). However, I can now not change the order of the categories in the backend. Arrows and numbering are no longer working.... It used to be fine.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: thinapav on November 18, 2013, 02:08:37 AM
I have applied the patch but but all my categories order is reset to 0 and I have alot of categories/subcategories and products. Is there a fix to this or do I have to reorder everything again as I have thousands of products. Thanks
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: MarioP on November 18, 2013, 08:29:48 AM
Same here :( After the patch implementation save order function stopped to work (VM backend). We have "new orderding saved" but there's no effect...
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 18, 2013, 20:28:01 PM
No, you do not have to reorder everything. the Patch was just not correct. I think I just found it.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: ne0beatsm0rp98 on November 19, 2013, 03:21:06 AM
how did you fix this as I have had the same issue, patch kind of helped but when I click on any categories it doesn't save the ordering.

www.repairsupplierliverpool.com
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: david64 on November 19, 2013, 08:56:16 AM
Quote from: inu2005 on November 18, 2013, 01:44:38 AM
QuotePlease use this attachment,
the structure is like your joomla, just extract it directly into your root folder. It should overwrite the config and category model and parts of the config view.

I used the attachment and my manual order of the categories is back (no longer alphabetical which occured after the 2.0.24a update). However, I can now not change the order of the categories in the backend. Arrows and numbering are no longer working.... It used to be fine.
and
Quote from: MarioP on November 18, 2013, 08:29:48 AM
Same here :( After the patch implementation save order function stopped to work (VM backend). We have "new orderding saved" but there's no effect...

I am still having the same problems.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: henk de kip on November 19, 2013, 14:15:30 PM
Have the same problem since I up-dated yesterday. My site is still not on-line. Can you fix the problem, so I don't have to look for other ways to fix the category ordering?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Wibah on November 19, 2013, 14:52:12 PM
I can confirm the same issue.

Manual sortorder works again, but i can't change the sortorder. Please fix :)
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: jenkinhill on November 19, 2013, 15:00:08 PM
It is fixed. 2.0.24b available from http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Setko on November 19, 2013, 16:50:48 PM
After updating to 2.0.24b, i get this:

Fatal error: Using $this when not in object context in administrator\components\com_virtuemart\models\category.php on line 121
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: simbus82 on November 19, 2013, 17:04:24 PM
Quote from: Setko on November 19, 2013, 16:50:48 PM
After updating to 2.0.24b, i get this:

Fatal error: Using $this when not in object context in administrator\components\com_virtuemart\models\category.php on line 121

And i cannot link a menu to "categories list" in Joomla: blank page!
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 19, 2013, 18:45:57 PM
Here is an FAQ written about it http://forum.virtuemart.net/index.php?topic=120413.msg410322#msg410322

You must also update your AIO!

In case you have some overrides, follow this small guide to update the layout overrides. Even non programmers should be able to do it with concentration and care.

Quote
please search for JFactory::getCache and delete this line.
Search also for
$cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category->virtuemart_category_id );
and replace it by
VmModel::getModel('category')->getChildCategoryList($vendorId, $category->virtuemart_category_id );
Be aware it can be also $child instead of $category. the part behind getChildCategoryList stays the same. This change enhances in some stores drastically the speed.

So this $categories = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category->virtuemart_category_id );

is now $categories= VmModel::getModel('category')->getChildCategoryList($vendorId, $category->virtuemart_category_id );

sometimes it is written that way $childs = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$virtuemart_vendor_id,$child->virtuemart_category_id

Then use of course the other parameters.
$childs = VmModel::getModel('category')->getChildCategoryList($virtuemart_vendor_id, $child->virtuemart_category_id );
But the pattern is always the same.

Attention:
You never have to edit the core files. The error comes due category MODULES ! The only thing we did is to change the call in the mod_virtuemart_category.php. the layouts should still work. The problem is that people copied the whole module to create their own and that is creating the problem. So if someone has a layout override for the virtuemart module, there is no problem. I did not expect that soo many people just copied the vm module instead just to provide another layout.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Pitpan on November 19, 2013, 19:25:51 PM
No 2.0.24b does not solve the problem!!!
Categories can not moved at all!!!
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 19, 2013, 19:51:10 PM
You should go in the vmconfig and store your desired ordering one time.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Pitpan on November 19, 2013, 19:55:26 PM
Can you please be more specific?
Do you mean Virtuemart>Configuration>Configuration ?
Where can i do that?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: simbus82 on November 19, 2013, 19:58:39 PM
Quote from: Milbo on November 19, 2013, 18:45:57 PM
You must also update your AIO!

In case you have some overrides, follow this small guide to update the code. Even non programmers should be able to do it with concentration and care.

So this $categories = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category->virtuemart_category_id );

is now $categories= VmModel::getModel('category')->getChildCategoryList($vendorId, $category->virtuemart_category_id );

sometimes it is written that way $childs = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$virtuemart_vendor_id,$child->virtuemart_category_id

Then use of course the other parameters.
$childs = VmModel::getModel('category')->getChildCategoryList($virtuemart_vendor_id, $child->virtuemart_category_id );
But the pattern is always the same.

+1! Thanks!
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Pitpan on November 19, 2013, 20:18:58 PM
I also have the same problem as simbus82.
I have replaced what you suggest in the overide files and still have blank page on menu item leading to categories.
Should i do the same replacement in core files too?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: MarioP on November 19, 2013, 21:16:24 PM
Ordering works but yes, there's again something wrong. Menu items ( or categories on the VM front page) which were assigned to Virtuemart Categories Layout lead to blank page...I have no any overrides. I updated the VM core and the AIO...
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Pitpan on November 19, 2013, 21:29:48 PM
Ordering works in admin BUT in module VM Categories the categories are sorted alphabetically
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 19, 2013, 23:22:50 PM
Quote from: MarioP on November 19, 2013, 21:16:24 PM
Ordering works but yes, there's again something wrong. Menu items ( or categories on the VM front page) which were assigned to Virtuemart Categories Layout lead to blank page...I have no any overrides. I updated the VM core and the AIO...

I think I wrote the answer here http://forum.virtuemart.net/index.php?topic=120375.msg410105#msg410105
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: MarioP on November 19, 2013, 23:48:00 PM
Thank you Milbo, works.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: david64 on November 20, 2013, 00:55:39 AM
i have no overrides and the ordering seems to be all set back to normal in the back end with numbers again I have done the save but it is not changing and is still alphabetical . Dont think I will be so quick to update next time.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 20, 2013, 02:03:39 AM
Did you delete your cache? Did you store it in the vm config? it is maybe using an old config value.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: michelming on November 20, 2013, 05:27:32 AM
Upgrade to 2.0.24b, I found in the 'default category sort order' has a COM_VIRTUEMART_CATEGORY_SHARED option, which is useful for?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 20, 2013, 10:40:28 AM
this is for multivendor, yeh I should do a check there, right.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: inu2005 on November 20, 2013, 12:23:13 PM
The 2.0.24b patch solved my problems with the category ordering problems and saving the order. I only had to set again the category order in the configuration. Thanks!
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: philphil987 on November 20, 2013, 14:02:40 PM
Ordering problem is not solved here, even with upgrade to 2.0.24b. Are you still working on that issue or is it considered as solved?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 21, 2013, 14:15:45 PM
philphil987 which ordering problem. Sorry you must be more specific and detailed. Do you mean the ordering of products or categories. Which configution is set? Do you use 3rd party extensions, which maybe change the ordering? Do you mean the ordering of the categories in the BE? the moving of categories in the BE, there are so many different orderings.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: philphil987 on November 21, 2013, 22:39:49 PM
Hi Milbo, sorry for being imprecise.... Since the update I have the problem with ordering categories. They are displayed in alphabetical order in frontend, even though in backend I have the same ordering than before the update (which is not alphabetically).
Regarding configuration, what do you mean exactly? I have Joomla! 2.5.16 and Virtuemart 2.0.24b.
Regarding 3rd party extension, I have a few components such as Acymailing, Freestyle FAQs, ReDJ, Xmap, But they were all there before the update.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Pitpan on November 21, 2013, 22:42:23 PM
Check these options in config

[attachment cleanup by admin]
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: philphil987 on November 21, 2013, 22:49:27 PM
Yes thanks, I already did a lot of testing with that functionality, without success..... But now, suddenly IT WORKS!!! Thanks mate! Probably I had some pages cached by the browsers....
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Pitpan on November 21, 2013, 22:50:40 PM
It is supposed to work with this configuration.
Did you empty your cache?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on November 22, 2013, 12:24:25 PM
damn, I found a new error, check your vmmodel.php in BE/helpers

around line 155 replace the function with the corrected one


function removevalidOrderingFieldName($name){
$key=array_search($name, $this->_validOrderingFieldName);
if($key!==false){
unset($this->_validOrderingFieldName[$key]) ;
}
}
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: teucg on December 17, 2013, 23:51:46 PM
Thank you !
This issue seems to be completely resolved in virtuemart 2.0.26 http://virtuemart.net/news/latest-news/452-virtuemart-2-0-26-includes-paypal-express-checkout-paypal-pro-and-paypal-pro-hosted (http://virtuemart.net/news/latest-news/452-virtuemart-2-0-26-includes-paypal-express-checkout-paypal-pro-and-paypal-pro-hosted)

It is a beautiful sight.

I really appreciate all the hard work that is put into virtuemart and it is still my favorite Joomla shopping system.
Though lately I had to use an other system for Joomla 3.2 unfortunately.
Awaiting the release of a Virtuemart compatible with Joomla 3.2
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on December 19, 2013, 12:13:16 PM
I am sorry to say, but imagine there is a problem with a store on j3 and a court is asking me if the webagency did the standard to prevent damages. then I would say that the webagency did by far not the best to protect their customer, because they used a version which is only supported for 6 months as basic for an ecommerce system. Be aware after the 6 months the version is obsolete. Most webshops need a year to reach the regular business.

That is the real reason. We started with j3 and it is full of flaws. We had to replace JText, JInput, checkToken and so on. A lot stuff which was running on j3.1 is not running on j3.2 anylonger. In our case it is not simple to create a version running on j2.5 and j3.x.
For an ecommerce system we need long term supported, secure, stable and reliable systems. We hope of course that j3.5 will have this attributes, but all STR of joomla do not by definition.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: MKI-Miro on February 22, 2014, 18:45:51 PM
I found next problem

1 level categories order is OK
2 level is always sorting alphabeticaly VM 2.0.27 and Joomla 2.5.18
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on February 24, 2014, 00:04:27 AM
What does vm2.5?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: bulesz on April 10, 2014, 19:14:05 PM
Yes, same here, the second or so (sublevel) level of categories are displayed in ABC order in the VM category module instead of the manual order.. :(
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: studiofaber on April 25, 2014, 11:49:14 AM
Is this fixed in VM 2.6? I have the exact same problem here  :(
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: bdimov on April 28, 2014, 17:48:35 PM
Hi,

I use VM2 2.0.27 and have the same problem with ordering categories in category view.

I change order from categories in VM2 administration(attach file) but there is no change in shop.
(http://i59.tinypic.com/2ithmpt.jpg)
Anyone have idea about this problem?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on April 29, 2014, 12:00:32 PM
Quote from: bulesz on April 10, 2014, 19:14:05 PM
Yes, same here, the second or so (sublevel) level of categories are displayed in ABC order in the VM category module instead of the manual order.. :(

I think I need some skype session to believe that. I fear we need also different sample data.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: EkimGram on May 01, 2014, 18:30:32 PM
Quote from: studiofaber on April 25, 2014, 11:49:14 AM
Is this fixed in VM 2.6? I have the exact same problem here  :(

I just updated a client's website to 2.6 on Joomla 2.5.19 and they are having this problem so it seems not.

Is there anything that can be done?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: RedJohn on June 03, 2014, 13:15:31 PM
it can be fix in mod_virtuemart_category.php

change


$categories = $categoryModel->getChildCategoryList($vendorId, $category_id);
to
$categories = $categoryModel->getChildCategoryList($vendorId, $category_id,'c.ordering');

and

$category->childs = $categoryModel->getChildCategoryList($vendorId, $category->virtuemart_category_id) ;
to
$category->childs = $categoryModel->getChildCategoryList($vendorId, $category->virtuemart_category_id,'c.ordering');


Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: djugut on June 09, 2014, 18:49:00 PM
Hello.
I have a  same problem  with order of the categories.  I guess ordering depends on manual settings saved in VM backend ->Product categories, but the categories are displaying alphabetized. I try the attachment but it not work
Please help! :)
Joomla! 2.5.8
VM. 2.6.6
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: jenkinhill on June 09, 2014, 20:46:04 PM
http://forum.virtuemart.net/index.php?topic=122317.msg419257#msg419257

And you should update your Joomla!  http://forum.virtuemart.net/index.php?topic=118683.0
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Madde on June 23, 2014, 09:20:36 AM
There seems to still be some kind of problem on the product ordering.

My client wants the products to be sorted as Product Order, but now and then the system goes to the alphabetical ordering. We never know when this will happen.

Joomla 2.5.19
VM 2.6.0

Also the Display Stock Level now and then decides to "show" although we don't want it to show...

Is there a way to make the configuration remain as we want it?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on June 23, 2014, 09:56:21 AM
Quote from: Madde on June 23, 2014, 09:20:36 AM
There seems to still be some kind of problem on the product ordering.

My client wants the products to be sorted as Product Order, but now and then the system goes to the alphabetical ordering. We never know when this will happen.
It works in general. The bug described here says that it does not work for sublevels. I was not able to reproduce it yet.

Quote from: Madde on June 23, 2014, 09:20:36 AM
Joomla 2.5.19
VM 2.6.0
You should update your joomla, vm core and vm aio!

Quote from: Madde on June 23, 2014, 09:20:36 AM
Also the Display Stock Level now and then decides to "show" although we don't want it to show...

Is there a way to make the configuration remain as we want it?

This is your template. It works with the standard template.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Madde on June 23, 2014, 10:27:06 AM
QuoteThis is your template. It works with the standard template.

We use the standard template in backend. This is a problem on the VM configuration page in backend, not in frontend (but of course it is reflected in frontend). It seems that the system reverts to some default configuration.

There is a file "virtuemart_defaults.cfg-dist" in the administrator/components/com_virtuemart folder. Maybe the system occasionally fail to get the latest settings and instead reads this file?

We need the settings to remain, that's all.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on June 23, 2014, 11:40:06 AM
?

It is impossible to solve a problem if it is not properly described. We have so many orderings in Vm. and no it has nothing todo with this file.

So the ordering gets broken in the backend for sublevels?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on June 23, 2014, 12:06:47 PM
Quote from: Milbo on June 23, 2014, 09:56:21 AM

Quote from: Madde on June 23, 2014, 09:20:36 AM
Also the Display Stock Level now and then decides to "show" although we don't want it to show...

Is there a way to make the configuration remain as we want it?

This is your template. It works with the standard template.

Quote from: Madde on June 23, 2014, 10:27:06 AM
We use the standard template in backend. This is a problem on the VM configuration page in backend, not in frontend (but of course it is reflected in frontend). It seems that the system reverts to some default configuration.

Yeh but in the Backend is no "display stock level".
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Madde on June 23, 2014, 12:16:41 PM
Sorry if I have not explained the problem properly.

We want the "Default product sort order" and the "Default category sort order " (in "Product Sort Order Settings", the tab "Product Order Settings" in backend, VM Configuration) to be set according to "Ordering". But occasionally the system changes this and then both products and categories are sorted according to "Product Name".

When this occurs, also the "Display stock level" is showing. We don't want it to show. (There is indeed a setting on the Shopfront tab in the VM Configuration.)

What might cause this problem?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Madde on June 24, 2014, 09:02:23 AM
You mean that it is the frontend template that changes the settings in VM configuration? How is this possible???
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Milbo on June 24, 2014, 09:33:48 AM
Quote from: Madde on June 23, 2014, 12:16:41 PM
But occasionally the system changes this and then both products and categories are sorted according to "Product Name".

I am sorry, but you are the first person with having a problem like that. I doubt it is in the vm core. I think there is a completly different problem.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: Madde on June 24, 2014, 19:38:08 PM
Thanks for your efforts.

Any clue on what the problem might be?
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: HauteSwan on January 09, 2015, 02:33:04 AM
I know what they were talking about.  I had my ordering set one way and it changed and changed the order a few times.  I am not sure why it did happen but I recognized what they were talking about.  It was random.  Maybe it reloaded an old cached page or something.
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: vantran on January 15, 2015, 22:35:25 PM
Quote from: RedJohn on June 03, 2014, 13:15:31 PM
it can be fix in mod_virtuemart_category.php

change


$categories = $categoryModel->getChildCategoryList($vendorId, $category_id);
to
$categories = $categoryModel->getChildCategoryList($vendorId, $category_id,'c.ordering');

and

$category->childs = $categoryModel->getChildCategoryList($vendorId, $category->virtuemart_category_id) ;
to
$category->childs = $categoryModel->getChildCategoryList($vendorId, $category->virtuemart_category_id,'c.ordering');

The override codes fix the category menu issue but can you show us how to fix the category layout?

Thanks
Title: Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
Post by: mromstoeck on June 05, 2015, 12:07:37 PM
Hi Milbo,

i am using Virtuemart Version 3.06. There are two problems in administrator/components/com_virtuemart/models/category.php:

  - in method getCategories _selectedOrdering is set to two items ($this->_selectedOrdering = 'c.ordering, l.`category_name`';)
  - in method getChildCategoryList _selectedOrdering is checkd for one item (if(!in_array($selectedOrdering, self::$_validOrderingFields)){)

Workaround: Set _selectedOrdering in method getCategories to one item ($this->_selectedOrdering = 'c.ordering').

Michael