Author Topic: debug VM Search SQL query?  (Read 362 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 462
debug VM Search SQL query?
« 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!

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10343
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: debug VM Search SQL query?
« Reply #1 on: December 22, 2021, 17:17:40 pm »
products model -> function sortSearchListQuery()

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EvanGR

  • Jr. Member
  • **
  • Posts: 462
Re: debug VM Search SQL query?
« Reply #2 on: December 24, 2021, 11:05:34 am »
Thanks!

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

Which helped a lot.

daniellemiller

  • Beginner
  • *
  • Posts: 1
  • A beginner
Re: debug VM Search SQL query?
« Reply #3 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 ...

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4550
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: debug VM Search SQL query?
« Reply #4 on: January 07, 2022, 16:19:47 pm »

daniellemiller What you tried and for what problem ???

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10153
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: debug VM Search SQL query?
« Reply #5 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
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/