Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

XCart 4 - How to know which template is used in a particular section of the page?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-23-2015, 11:16 PM
  aneel13's Avatar 
aneel13 aneel13 is offline
 

Senior Member
  
Join Date: Jul 2015
Location: Dubai
Posts: 148
 

Default XCart 4 - How to know which template is used in a particular section of the page?

I have a couple of questions concerning the XCart 4 templates:

1) How to know which template is used in a particular section of the page?
2) I am developing new modules, so how can I make sure that my tpl files are being used instead of tpl files from some other modules?
__________________
Regards,
Aneel Sarwar
X-Cart version: 5.2.10
Windows: 7
Modules: Free version modules
Reply With Quote
  #2  
Old 08-24-2015, 12:35 AM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,470
 

Default Re: XCart 4 - How to know which template is used in a particular section of the page?

Not 100% on the answer to the 2nd question..
But on your 1st query - I would enable Debug Mode which outputs all the smarty variables and tpl files being used on any given page.
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #3  
Old 08-24-2015, 05:14 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: XCart 4 - How to know which template is used in a particular section of the page?

1. admin general setting - debug mode.
You can also enable development mode from config.php if you want to see all php messages

2. XC4 is not like XC5 - whatever template you tell it to use that would be the one to use. The change is manual so another module will not run its templates unless files are modified to do so.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #4  
Old 08-25-2015, 04:11 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: XCart 4 - How to know which template is used in a particular section of the page?

Quote:
Originally Posted by aneel13
I have a couple of questions concerning the XCart 4 templates:

1) How to know which template is used in a particular section of the page?
2) I am developing new modules, so how can I make sure that my tpl files are being used instead of tpl files from some other modules?
1. Use the 'Webmaster mode', it will show you the whole structure of templates on the current page. Check the 'Tools' > 'Webmaster mode' section in your admin area to activate it.
2. You will need to manually specify templates you'd like to use in your code. X-Cart 4 will not overwrite them.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #5  
Old 08-25-2015, 04:22 AM
  aneel13's Avatar 
aneel13 aneel13 is offline
 

Senior Member
  
Join Date: Jul 2015
Location: Dubai
Posts: 148
 

Default Re: XCart 4 - How to know which template is used in a particular section of the page?

After debug and webmaster mode on. Only the colour has changed for the site. How to find out the tpl files being used?
__________________
Regards,
Aneel Sarwar
X-Cart version: 5.2.10
Windows: 7
Modules: Free version modules
Reply With Quote
  #6  
Old 08-25-2015, 10:11 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: XCart 4 - How to know which template is used in a particular section of the page?

Quote:
Originally Posted by aneel13
After debug and webmaster mode on. Only the colour has changed for the site. How to find out the tpl files being used?
A popup with the tempalte structure should appear once you enable the webmaster mode.
Please make sure that popup windows are allowed in your browser.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote

The following user thanks razortw for this useful post:
aneel13 (08-25-2015)
  #7  
Old 08-25-2015, 08:08 PM
  aneel13's Avatar 
aneel13 aneel13 is offline
 

Senior Member
  
Join Date: Jul 2015
Location: Dubai
Posts: 148
 

Default Re: XCart 4 - How to know which template is used in a particular section of the page?

Yes got it
__________________
Regards,
Aneel Sarwar
X-Cart version: 5.2.10
Windows: 7
Modules: Free version modules
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:19 AM.

   

 
X-Cart forums © 2001-2020