Hi,
I've used natural sorting in my Old VM 1.1.9 configuration and everything goes well.
Now I'm updating to VM 2.0.26d and I couldn't use the same procedure.
The steps to install are very easy.
1. Log into PhpMyAdmin and select your database
2. Ejecute the following mysql script: natsort.install.mysql
3. In VM 1.1.9 I've modified shop_browse_queries.php in line 287 with the following code:
$q .= "\n ORDER BY natsort_canon($orderbyField,'natural') $DescOrderBy";
Someone could tell me where I can do the same in VM 2.0.26d ?
This is the link of natsort:
https://drupal.org/project/natsort
Check sorting option in VM config.
Quote from: Maxim Pishnyak on April 07, 2014, 13:09:31 PM
Check sorting option in VM config.
Thanks for your answer.
Do you mean in Configuration -> Product Order Settings ?
Yes.
Quote from: Maxim Pishnyak on April 08, 2014, 13:15:24 PM
Yes.
There isn't any option to have Natural Sort. Only sort by Product Name and Ascending or Descending.
Could you explain where do you know it is the option?
Regards!
PS: by the way, now I'm on VM 2.6.0
Natural=Order.
Quote from: Maxim Pishnyak on April 08, 2014, 22:58:03 PM
Natural=Order.
Thanks for your answer. I'm attaching a screenshot of VM Configuration.
If I choose Ordering, the products are ordered in the same way that Product Name.
[attachment cleanup by admin]
Product id?
Quote from: Maxim Pishnyak on April 09, 2014, 13:19:59 PM
Product id?
Product ID is wrong because it's only a number.
Do you understand what do I meant to do?
Example:
Standard Order:
HDJ-1500
HDJ-500
HDJ-2000
Natural Order:
HDJ-500
HDJ-1500
HDJ-2000
Nobody knows how can I use Natural Sort in VM2 ?
Why your natural order doesn't equal to sorted order? Screenshot maybe for backend area with products?
Quote from: Maxim Pishnyak on April 10, 2014, 22:28:20 PM
Why your natural order doesn't equal to sorted order? Screenshot maybe for backend area with products?
Thanks for your answer. I'm attaching a screenshot of my product backend.
There you could see that ordering by Product Name isn't Natural because you have:
HDJ-1500
HDJ-2000
HDJ-500
And the right order should be:
HDJ-500
HDJ-1500
HDJ-2000
That's why I'm asking here how can I do it.
In my old VM 1.1.9 I've done it inserting a script in my mysql database and also modified a file at virtuemart.
If you see my first post, you understand How can made it.
Maybe you could tell me where I've to modify de ORDER BY command in VM2.
Regards.
[attachment cleanup by admin]
Why you don't change for HDJ-500 value 9 to 1?
Quote from: Maxim Pishnyak on April 11, 2014, 14:18:41 PM
Why you don't change for HDJ-500 value 9 to 1?
Thanks for your answer.
I've tried your manual solution and it works using Ordering.
But this is not Natural Sort, just order products as I left them.
I think VM developers should think to add real Natural Order because If I have a large catalog I have to make a manual order.
Regards.
I can't see ids on your picture.
Also check CSVI and OpenOffice capabilities.