Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Joomla Virtuemart Template - DarkMart (SKU# FLEX-00011)

TOPIC: Product sorting not working

Product sorting not working 10 years 5 months ago #7214

Hi,

I'm having trouble with product sorting. After updating Virtuemart to the 2.0.24 version, it does not seem to work anymore. On my shop I have there the adding date and the price of the products. Since you click the product sorting, it arranges the products by price descendingly and then keeps them that way, no matter which way you sort the products next. Is this a template related issue or Virtuemart issue? Because if you look at the source code, only price is in the dropdown/link thing...
<div class="orderlistcontainer">
 <div class="title">Sorteeri</div>
 <div class="activeOrder">
 <a href="/index.php?option=com_virtuemart&amp;view=category&amp;virtuemart_category_id=48&amp;Itemid=482&amp;filter_product=&amp;keyword=" title="Kahanevalt">Toote lisamise kuupäev Kahanevalt</a>
 </div>
 <div class="orderlist" style="display: none;">
 <div><a href="/index.php?option=com_virtuemart&amp;view=category&amp;virtuemart_category_id=48&amp;Itemid=482&amp;filter_product=&amp;keyword=&amp;orderby=product_price" title="Toote hind">Toote hind</a>
 </div>
 </div>
 </div>

My shop is accessible at www.sysimust.com/index.php

Best wishes,
Maris
The topic has been locked.

Product sorting not working 10 years 5 months ago #7248

Hi,

I can assure you this is a Virtuemart thing, you may try it with the original Virtuemart (with using joomla beez_20 template) the result will be the same.

I will tell you why it behaves like that, you may come up with a tricky solution that works for you.

Let's say, you have this ordering product settings in the backend:

Attachment Pasted_Image_11_13_13__5_51_PM-6.png not found



In the frontend, once you first open any category page. the products will be sorted by "Product Name" and there will be an option to sort them "by price", which is normal. Everything is fine.

Attachment Pasted_Image_11_13_13__5_55_PM-6.png not found



But things are getting acting weird then if you click the "sort by price" drop down link.
If you sort the products with any "other available" sorting option. (it is "by price" in our case). Then there is no way to get back to default sorting (which is "by product name" in our case). Because the cache gets involved (which is ideally good way but creates problem some cases) and the URL don't get updated to get back to default sorting.

The solution is, changing the "default sorting" to "Ordering", which uses the official sorting that you sort products in the Virtuemart backend manually (VM Backend >> Products >> Products)

Attachment Pasted_Image_11_13_13__5_59_PM-10.png not found



and select "Product name", "Product by Price" and (optional) "Ordering" options from the available sorting options section.

Attachment Pasted_Image_11_13_13__6_02_PM-4.png not found




So by this method, once you sort product "by price", then you will have the option to sort again by "product name". BUT YOU WON'T BE ABLE TO GO BACK TO "ORDERING" (which was the "Default sorting")

Understand the idea? If the "Ordering" and "Product Name" are exactly the same. Then there will be no problem. You can't get back to "Ordering" but you can go back to "by product name" which are actually the same things.

anyway, do some tests and try until you get the best solution

This is not a patch. It is the tricky way (that i have found out) to solve the problem without core VM hacking.

Regards.
Support.
Last Edit: 10 years 5 months ago by Support.
The topic has been locked.

Product sorting not working 10 years 5 months ago #7308

Hi,

Yes, I think I understand the idea. The only downside with this solution is that I have to order the products manually since all my products have zero in the "Reorder" column. And I have more than 300 products in my shop.

While I was testing your trick, I discovered a more serious Virtuemart bug. With a newer version of Virtuemart (I'm using 2.0.24), one can also choose to show the product sorting option ascendingly or descendingly. I wanted to sort my product categories so, that the most recently added items are in the beginning. So I chose "Creation date" and "Descending". I discovered that when a default ordering option is set to "Descending", then the switching between ascending and descending is not working. But if the default ordering option is set to "Ascending", then the switching works.

Can you help me to fix the switching with the default set to "Descending"?

Best wishes,
Maris
The topic has been locked.

Product sorting not working 10 years 5 months ago #7326

Hi,

I can't, because this looks like a problem that requires hard coding of some VM files which is beyond our free support. You may try the same settings in original virtuemart with using beez_20 joomla template, I am 100% the result will be the same. This makes us "not-responsible" for the bugs, because we are template publishers only.

But i suggest you to get vm2.0.24a, because in the release notes, i saw; this version has specifically released to fix the bugs on "sorting" products. This update might solve the problem you are talking about. If not, there is not much thing i can do about it.

Regards,
Support & Development
The topic has been locked.

Product sorting not working 10 years 4 months ago #7429

Hi,

Sorry for not replying sooner! I assumed you already marked the topic "Solved"...
Anyway, thank you for your suggestion! Unfortunately it didn't solve my problem. Even the version 2.0.24c didn't, but as you said it before, it's VMs problem, not Flexibles. So I will continue this topic under the VMs forum and this topic here can be marked as "Solved".

Best wishes,
Maris
The topic has been locked.

Product sorting not working 10 years 4 months ago #7471

Hi again,

I wanted to let you know, that Milbo from Virtuemart fixed the problem. With the current 2.0.24c version, you need to replace a product.php file in the \administrator\components\com_virtuemart\models folder. You can download the new and working file from the Virtuemart forum: forum.virtuemart.net/index.php?topic=120459.0;topicseen Scroll down to reply #11 (need to be registered user to download thou).
After replacing, the product sorting worked like a charm! No need for the tricky solution anymore either. For those who can't or don't want to replace the product.php file, they need to wait for the 2.0.24d version to come out. For those impatient as I am, I recommend the file replacing.

Case closed. Topic solved.

Best wishes,
Maris
The topic has been locked.

Product sorting not working 10 years 4 months ago #7472

Hi,

The trick that i have provided you is the only method i have to handle this problem. I don't even think VM developers are aware this is a bug. If you rise this problem in the virtuemart forum. I am sure you will grab their attention and if it is an easy fix, they will include the patch to upcoming VM release.

The trick that i have provided previously might also be useful others though (especially if you have less products which makes the manual sorting product easier). So i am marking this case solved and closing the topic for clearance.

Regards,
Support
The topic has been locked.
Time to create page: 0.108 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo