Author Topic: Solved Sort order bug in 2.0.4...2.0.8  (Read 16456 times)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Sort order bug in 2.0.4...2.0.8
« Reply #15 on: July 03, 2012, 12:32:23 pm »
Thanks for pushing, I take a look. Lets hope I find it fast and it is in the B version :-)
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: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Sort order bug in 2.0.4...2.0.8
« Reply #16 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

BaidareW

  • Jr. Member
  • **
  • Posts: 111
Re: Sort order bug in 2.0.4...2.0.8
« Reply #17 on: July 03, 2012, 20:06:32 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Sort order bug in 2.0.4...2.0.8
« Reply #18 on: July 03, 2012, 22:40:16 pm »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

DaggaTora

  • Jr. Member
  • **
  • Posts: 253
Re: Sort order bug in 2.0.4...2.0.8
« Reply #19 on: July 04, 2012, 09:23:12 am »
Yes, that is a nice step!
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Sort order bug in 2.0.4...2.0.8
« Reply #20 on: July 04, 2012, 12:06:29 pm »
Imho we can now work with it, before the habits you have to keep were to crazy.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

BaidareW

  • Jr. Member
  • **
  • Posts: 111
Re: Sort order bug in 2.0.4...2.0.8
« Reply #21 on: July 04, 2012, 21:29:45 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Sort order bug in 2.0.4...2.0.8
« Reply #22 on: July 05, 2012, 00:07:43 am »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Urs

  • Jr. Member
  • **
  • Posts: 64
Re: Sort order bug in 2.0.4...2.0.8
« Reply #23 on: July 05, 2012, 13:32:45 pm »
Thanks Milbo! For me solved! Finally....

BaidareW

  • Jr. Member
  • **
  • Posts: 111
Re: Solved Sort order bug in 2.0.4...2.0.8
« Reply #24 on: July 05, 2012, 22:03:44 pm »
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

  • Beginner
  • *
  • Posts: 2
Re: Sort order bug in 2.0.4...2.0.8
« Reply #25 on: July 09, 2012, 14:46:06 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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Solved Sort order bug in 2.0.4...2.0.8
« Reply #26 on: July 09, 2012, 15:13:10 pm »
from 2.0.8 to 2.0.8c is no 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/

adamo

  • Beginner
  • *
  • Posts: 2
Re: Solved Sort order bug in 2.0.4...2.0.8
« Reply #27 on: July 10, 2012, 09:39:26 am »
I find problem - wrong catogory id to ordering product. Must change function getProductSingle() in administrator/components/com_virtuemart/models/product.php
Code: [Select]
/* 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

  • Beginner
  • *
  • Posts: 22
Re: Solved Sort order bug in 2.0.4...2.0.8
« Reply #28 on: August 01, 2012, 11:43:36 am »
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

  • Beginner
  • *
  • Posts: 3
Re: Solved Sort order bug in 2.0.4...2.0.8
« Reply #29 on: August 09, 2012, 10:29:00 am »
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...