VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: roebba on May 12, 2012, 14:45:59 PM

Title: Debug functionality - how to find the relevant file(s) for editing?
Post by: roebba on May 12, 2012, 14:45:59 PM
Hi

There was a nice function in VM1, where you could see which file that was parsed after enabling the debug mode.
I can't find such a function in VM2 (It has a debug mode, but it doesn't show which files are being parsed).

Anybody?

---
Joomla 2.5.4 | VM2 2.0.6
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: buyonlineindia on May 20, 2012, 11:16:28 AM
same here find it difficult to debug in VM2....
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: roebba on June 16, 2012, 20:46:11 PM
Seriously... Are there nobody which can give a hint here??
Please.
:-\
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: PRO on June 16, 2012, 20:59:31 PM
what do you want to do?
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: roebba on June 17, 2012, 00:40:10 AM
I don't remember exactly, but in VM1 / Joomla 1.x there was a possibility to toggle on a kind of a debug mode. With this toggled on small dots with exclamation points came up, by the mouse over function on theese (if i remember correctly)  you could actually see which file (filename) that had been parsed for that part of the page. This function was very nice to use to find out which files/code that was executed....


Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: richdean77 on July 06, 2012, 13:45:10 PM
Does anyone know how to turn on a debug mode?

This is the first time I have used virtuemart, in the past I have used Magento and it has an inbuilt debugging mode which allows you to turn on hints so you know what files control what on the screen.

I am finding it extremely difficult to find files when I need to change something or customize something, does anyone have any hints on how to make this easier for web designers like myself to find files that need to be edited?
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: PRO on July 06, 2012, 21:03:16 PM
Quote from: richdean77 on July 06, 2012, 13:45:10 PM
Does anyone know how to turn on a debug mode?

This is the first time I have used virtuemart, in the past I have used Magento and it has an inbuilt debugging mode which allows you to turn on hints so you know what files control what on the screen.

I am finding it extremely difficult to find files when I need to change something or customize something, does anyone have any hints on how to make this easier for web designers like myself to find files that need to be edited?

http://forum.virtuemart.net/index.php?topic=90935.0
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: oorrcc on August 13, 2013, 09:12:01 AM
I have exactly the same question.  I am new with VM2. I tried Virtuemart V2.0.22a.  I found there is used to have the little question mark on the left top in the frontend when I turn on the debug mode. And I can easily find the relevant files by mouse over it. Now there is nothing but a lot of descriptions with Exclamation marks. And I can't find any documentation of file structure for VM2. Is there anybody can help? Thanks.
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: Maxim Pishnyak on August 13, 2013, 10:35:21 AM
Could you provide a link? I'll be able to dig that issue.
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: jenkinhill on August 13, 2013, 15:46:18 PM
We do not support hacking the core files, so the debug mode is really only for experienced VM developers. In most cases users just need to edit the view files using template overrides or css override. Just about everything else can be changed in configuration.

So what is your precise issue?
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: oorrcc on August 16, 2013, 02:37:36 AM
Thanks for all your help.
What I am looking for is:
1. in VM1.19, the browse pages are in folder:components/com_virtuemart/themes/default/templates/browse, and the product detail pages are in foler:/public_html/components/com_virtuemart/themes/default/templates/product_details, and I can easily setup them in the product category page. In VM2, I cant found the folder structure is different and I cant find any documentation introduce the folder.
2. in VM 1.19, if I want enable the debug mode, I can easily find which file I should modify to change the layout by move the mouse to the little question mark. But this function is gone.
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: jenkinhill on August 16, 2013, 13:17:14 PM
In VM2 the view files (templates) can all be found under components/com_virtuemart/views/ - each subdirectory from there has an obvious name.

You should use any edited view file as a template override.

Documentation for the template system is in http://docs.virtuemart.net/tutorials/33-templating-layouts.html
Also see http://www.ostraining.com/blog/joomla/overrides   http://forum.virtuemart.net/index.php?topic=90935.0  http://forum.virtuemart.net/index.php?topic=98505.0

If you disable SEO in VM Configuration/SEO then the page url gives a good hint to the fileset used.
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: sandomatyas on May 02, 2018, 15:31:35 PM
Old topic but still actual.
I have to manage a site which uses 4 templates and every template has several layouts for productdetails view, and administrators set different layouts for different categories, it is a big mess. When I try to debug it, it takes a lot of time to find which file is in use.
When you enable debug mode it would be great to display which template files are loaded with full path, it would help a lot!
Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: jenkinhill on May 02, 2018, 16:01:17 PM
If I have to create more than one override file I add an HTML comment that it will display in the page code to enable the file(s) used to be identified.
eg  <!-- jhoverride prices hidden -->

If I use jhoverride for the first word in each comment then a quick search of the generated page code will show which override (or overrides if more than one)  is used.

I don't think it would be possible to identify the templates in debug.


Title: Re: Debug functionality - how to find the relevant file(s) for editing?
Post by: sandomatyas on May 02, 2018, 21:57:36 PM
Quote from: jenkinhill on May 02, 2018, 16:01:17 PM
If I have to create more than one override file I add an HTML comment that it will display in the page code to enable the file(s) used to be identified.
eg  <!-- jhoverride prices hidden -->

If I use jhoverride for the first word in each comment then a quick search of the generated page code will show which override (or overrides if more than one)  is used.

I don't think it would be possible to identify the templates in debug.

You're right, I do something similar but frankly, there should be something debug info about it in the system itself. There are so many views, layouts, sublayouts :)