VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: EvanGR on December 22, 2021, 15:52:30 PM

Title: debug VM Search SQL query?
Post by: EvanGR on December 22, 2021, 15:52:30 PM
Hello,

I want to print (vmdebug) the SQL query from the VM Search module.
It's probably in the model product.php somewhere, but I am having a hard time finding it. (the variable that holds the final complete query)
Can anyone help?

Thanks!
Title: Re: debug VM Search SQL query?
Post by: GJC Web Design on December 22, 2021, 17:17:40 PM
products model -> function sortSearchListQuery()

Title: Re: debug VM Search SQL query?
Post by: EvanGR on December 24, 2021, 11:05:34 AM
Thanks!

And there was a commented out vmdebug statement in there:
vmdebug ( ' joined ? ',$select, $joinedTables, $whereString, $groupBy, $orderBy, $this->filter_order_Dir );   

Which helped a lot.
Title: Re: debug VM Search SQL query?
Post by: daniellemiller on January 07, 2022, 07:28:40 AM
And there is no simpler solution for solving this problem! I tried too with your steps and so far I have not succeeded ...
Title: Re: debug VM Search SQL query?
Post by: Studio 42 on January 07, 2022, 16:19:47 PM

daniellemiller What you tried and for what problem ???
Title: Re: debug VM Search SQL query?
Post by: Milbo on January 12, 2022, 12:32:37 PM
There is a simpler solution. The new version has a new debug option, which just enables the commented line. and that helps a lot ;-)

https://dev.virtuemart.net/attachments/1297/com_virtuemart.3.8.9.10578_package_or_extract.zip