Author Topic: VM manual ordering of categories stopped to work after update to 2.0.24a.  (Read 33876 times)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
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.

Joomla 2.5.19
VM 2.6.0
You should update your joomla, vm core and vm aio!

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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Madde

  • Beginner
  • *
  • Posts: 24
Quote
This 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.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
?

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?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3

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.

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".
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Madde

  • Beginner
  • *
  • Posts: 24
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?

Madde

  • Beginner
  • *
  • Posts: 24
You mean that it is the frontend template that changes the settings in VM configuration? How is this possible???

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Madde

  • Beginner
  • *
  • Posts: 24
Thanks for your efforts.

Any clue on what the problem might be?

HauteSwan

  • Beginner
  • *
  • Posts: 1
  • Skype Name: HauteSwan
Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
« Reply #68 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.

vantran

  • Beginner
  • *
  • Posts: 1
Re: VM manual ordering of categories stopped to work after update to 2.0.24a.
« Reply #69 on: January 15, 2015, 22:35:25 pm »
it can be fix in mod_virtuemart_category.php

change


Code: [Select]
$categories = $categoryModel->getChildCategoryList($vendorId, $category_id);to
Code: [Select]
$categories = $categoryModel->getChildCategoryList($vendorId, $category_id,'c.ordering');
and

Code: [Select]
$category->childs = $categoryModel->getChildCategoryList($vendorId, $category->virtuemart_category_id) ;to
Code: [Select]
$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

mromstoeck

  • Beginner
  • *
  • Posts: 2
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