News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Debug functionality - how to find the relevant file(s) for editing?

Started by roebba, May 12, 2012, 14:45:59 PM

Previous topic - Next topic

roebba

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

buyonlineindia


roebba

Seriously... Are there nobody which can give a hint here??
Please.
:-\

PRO


roebba

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....



richdean77

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?

PRO

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

oorrcc

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.

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

jenkinhill

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?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

oorrcc

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.

jenkinhill

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.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

sandomatyas

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!

jenkinhill

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.


Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

sandomatyas

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 :)