VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: gtcnetworking on March 08, 2023, 06:30:53 AM

Title: Search order not working
Post by: gtcnetworking on March 08, 2023, 06:30:53 AM
Posting again as no replies.
28 views but no replies

Does anyone on this forum understand the search order functions ?
The links I gave clearly demonstrate an issue.

------------------

Hi I have a strange problem that I am struggling to resolve. Hopefully someone can help me.

The site is  VM 4.0.12 10777
Joomla 3.10.11
PHP 7.4.33

The problem seems to stem from how I link searched from the slideshows.
If I link this way

https://www.nsoffice.com.au/index.php/shop-menu/brands/keyword/yankee/view/category/virtuemart_category_id/0/search/true/start/0

And then change the default sort order from name to say price. - it works. I get the same items in price order. Note this link as a search item name - Yankee

If I link this way.

https://www.nsoffice.com.au/index.php/component/virtuemart/
view/category/virtuemart_category_id/564

this is a link to all the items in that category 564.

If you then change the sort order to price it fails !
Because it is now searching for the word "orderby"
My question is why ? There is no "orderby' in the link

And I am not sure when this started
Any help appreciated

ps I cannot update t0 Joomla 4.x yet as I have plugin compatibility issues

Derek




Modify message
Title: Re: Search order not working
Post by: jenkinhill on March 08, 2023, 11:34:24 AM
Have you checked if this issue occurs when you use Protostar?

Console shows JavaScript errors:

TypeError: a.default.detectStore(...) is undefined        h1-check.js:1:1301
TypeError: "addEventListener" is read-only                 bundle.js:1:7801
Title: Re: Search order not working
Post by: GJC Web Design on March 08, 2023, 19:03:50 PM
You don't appear to have any "shop" menu-- VM needs a base menu ( visible or hidden ) to the Root category

e.g. a menu named Shop  ->  index.php?option=com_virtuemart&view=category&virtuemart_category_id=0

so a VM category menu to the top level cat

then at least you get get nice urls like   https://www.nsoffice.com.au/index.php/shop/cleaning-products and may solve the orderby problem

enable your .htaccess and you'll get rind of the index.php

https://www.nsoffice.com.au/shop/cleaning-products