| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The template names in the source code | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Disclaimer: This mod is provided on an "as-is" basis without warranty of any kind. Feel free to use and improve it, but please do not sell it.
Description: This mod is for those X-Cart masters who are not familiar with the templates structure yet. Install this mod, refresh any dynamic X-Cart page and check the HTML source. You'll see that X-Cart prints the templates names where the '{include}' Smarty tags are used. So you'll be able to find the required template easily, just check the source and find the template name near the necessary HTML code. How to install: 0. This mod was created for X-Cart 4.1.7. If you use other X-Cart versions, you may need to alter the code. 1. Edit the '<xcart_dir>/include/func/func.core.php' file and add the following code before the last '>?' line: PHP Code:
2. Edit the '<xcart_dir>/Smarty-2.6.12/Smarty.class.php' file, replace: PHP Code:
with PHP Code:
then replace: PHP Code:
with PHP Code:
3. Again edit the '<xcart_dir>/Smarty-2.6.12/Smarty.class.php' file, replace: PHP Code:
with PHP Code:
and replace: PHP Code:
with PHP Code:
__________________
Eugene Kaznacheev, Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009) ex-Head of X-Cart Tech Support Department ex- X-Cart Hosting Manager - X-Cart hosting ex-X-Cart Technical Support Engineer Note: For the official guaranteed tech support services please turn to the Customers HelpDesk. |
|||||||||
#2
|
|||||||
|
|||||||
![]() I wish I had this mod a year ago...
Thanks anyway! ![]()
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
#3
|
|||||||
|
|||||||
![]() ![]() very cool. this should be stock... HOWEVER, there should be a "disable" switch so a visitor can't see or try to exploit this info. I don't need visitors knowing paths and template names. BUT - this is a great idea for newbies and stores in development. Thanks for posting this!
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Quote:
Use the following code: PHP Code:
X-Cart will show the template names only for the URLs like 'home.php?cat=111&show_template_names=Y', i.e. with 'show_template_names' parameter.
__________________
Eugene Kaznacheev, Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009) ex-Head of X-Cart Tech Support Department ex- X-Cart Hosting Manager - X-Cart hosting ex-X-Cart Technical Support Engineer Note: For the official guaranteed tech support services please turn to the Customers HelpDesk. |
|||||||||
#5
|
|||||||
|
|||||||
![]() Eugene,
Thanks... that's great, but for those of us with cdseo, this will not work, since our URLS look like, "domain.com/category/product.html But thank you for the idea...
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Quote:
The 'func_show_as_comment()' function can check that administrator is logged in, so X-Cart will show the template names in such cases only. (i.e. you log in as administrator and open the customer area) If you need this code, I can create it : )
__________________
Eugene Kaznacheev, Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009) ex-Head of X-Cart Tech Support Department ex- X-Cart Hosting Manager - X-Cart hosting ex-X-Cart Technical Support Engineer Note: For the official guaranteed tech support services please turn to the Customers HelpDesk. |
|||||||||
#7
|
|||||||
|
|||||||
![]() Quote:
Well that's a grea idea! So only a logged in admin (on the customer side) will see the code? Now that's brilliant. Is there a performance hit asociated with this? Thanks for contributing this!
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#8
|
|||||||||
|
|||||||||
![]() Quote:
No. Quote:
Use this code: PHP Code:
: )
__________________
Eugene Kaznacheev, Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009) ex-Head of X-Cart Tech Support Department ex- X-Cart Hosting Manager - X-Cart hosting ex-X-Cart Technical Support Engineer Note: For the official guaranteed tech support services please turn to the Customers HelpDesk. |
|||||||||
#9
|
|||||||
|
|||||||
![]() Eugene,
I found a slight problem with this new mod: In Windows IE6 and IE7, WHILE LOGGED IN as admin, it disrupts the css style sheet, to the point where a "centered" container no longer centers, category menus distort and basically the site looks like doo. A simple logout by the admin and everything is back to normal. if the admin logs in, then it looks like doo again (that is, CSS is not recognized or used). This problem does not show itself in Firefox (win or mac) or any mac browser. I did not test in Safari/windows. Basically, whatever is going on here disrupts the CSS code in MSIE 6 and 7 (win XP pro SP2 -- tested on 2 different machines) - ONLY when logged in as admin. For now, I have reverted to what I had, and I can re-visit this another time... Thanks Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#10
|
|||||||||
|
|||||||||
![]() Quote:
I've checked this mod on the default X-Cart installation and haven't found any errors. Do you use any custom templates? If yes, you need to add their names to the '$templates' array, so the 'func_show_as_comment' function will not process them.
__________________
Eugene Kaznacheev, Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009) ex-Head of X-Cart Tech Support Department ex- X-Cart Hosting Manager - X-Cart hosting ex-X-Cart Technical Support Engineer Note: For the official guaranteed tech support services please turn to the Customers HelpDesk. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|