News:

Support the VirtueMart project and become a member

Main Menu

Solved Sort order bug in 2.0.4...2.0.8

Started by Urs, April 10, 2012, 10:18:18 AM

Previous topic - Next topic

Milbo

Thanks for pushing, I take a look. Lets hope I find it fast and it is in the B version :-)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

I think I solved it. But again two files changed. We will upload the b version first to the forum. please check then.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

BaidareW

Hi,

thanks for the effort as this bug is really annoying.

But.. in 2.0.8b still not working. If I change the product order by entering number and then click save icon, it resets to values that it was before, so nothing changes.  Manual sort with arrows is working fine.

Milbo

Okey, this is not working perfectly, but it is not changing the order anylonger when editing the product, which was for me the real bug.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

DaggaTora

Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

Milbo

Imho we can now work with it, before the habits you have to keep were to crazy.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

BaidareW

Well it is still far from usable. I have category with more then 100 items, and I need them to sort. Now I need to click so many times to do this.. crazy..

Milbo

hmm, 100 items. interesting that you do them manually.

I am sorry, the c version is "already done" and I cant change it any longer. What we try to achieve next is that entered values are directly correctly stored. This is in fact a bug. Maybe it works worse since I fixed the other problem, that the ordering value is always set to 1.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Urs

Thanks Milbo! For me solved! Finally....

BaidareW

This is not solved 100%. One part of annoying bus is solved (not set to 1 after product edit and not set all to 1 after pressing save is solved) : manual sorting still not work if write sort order numbers by hand.

adamo

Quote from: Milbo on July 03, 2012, 13:34:02 PM
I think I solved it. But again two files changed. We will upload the b version first to the forum. please check then.
Which
Which two files have been modified?
I find change in file models/product.php in function saveorder() but what is second file? I can`t update all VM 8)

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

adamo

#27
I find problem - wrong catogory id to ordering product. Must change function getProductSingle() in administrator/components/com_virtuemart/models/product.php

/* Load the categories the product is in */
$product->categories = $this->getProductCategories($this->_id);
$virtuemart_category_id2 = JRequest::getInt('virtuemart_category_id', 0);//add this line


if ( !empty($product->categories) and is_array($product->categories) and !empty($product->categories[0]) ){
$product->virtuemart_category_id = $product->categories[0];
$q = 'SELECT `ordering`,`id` FROM `#__virtuemart_product_categories`
WHERE `virtuemart_product_id` = "'.$this->_id.'" and `virtuemart_category_id`= "'.$virtuemart_category_id2.'" ';//change this line
$this->_db->setQuery($q);
// change for faster ordering
$ordering = $this->_db->loadObject();
if(!empty($ordering)){
$product->ordering = $ordering->ordering;
$product->id = $ordering->id;
}

}
$ordering = $this->_db->loadObject();
if(!empty($ordering)){
$product->ordering = $ordering->ordering;
$product->id = $ordering->id;
}

}

RosaMagma

Hello,
Milbo, could you, please, tell me the files changed? I have 2.0.8a version and I have some customisation, so I don't want to update each version because I must do a lot of changes.
Or if there is a file where specific the changes between the versions is enough for me.
Thanks in advance

stimpy

#29
Please help me: This isn't fixed yet, is it?
I'm deperately trying to sort products by entering an ordering number in the backend, but as soon as I click "save", the products are ordered by who-knows-what.. ..There are ordering-numbers in the table, but not the ones, I've entered..
This is a real problem for me, 'cos it makes the product listings look quiet chaotic..

Should this problem be fixed yet? Can I fix it myself? Is someone working on it?
Can't really believe that a component as big and good as virtuemart has a huuuuge bug like this..? :/

Cheers,
  stimpy

PS: I'm on virtuemart v2.0.8e with Joomla v2.5.6...