| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
TPL files and their links to PHP files | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I'm in the midst of building a new template and trying to understand how the tpl files link to the php files they are associated with. For example, I look at search.tpl in the main directory (there are 3 others and 2 of them may be the same?) and there is no less than 4 search.php files located in various places.
I guess my main question is: How does the info from the search form know where it's getting posted too? Or how can I trace the path? If I have a new tpl file located in skin\, where should the corresponding PHP file be located? Thanks, Adam
__________________
Adam X-Cart Gold 4.4.5 - Live X-Cart Gold 4.1.11 - Retired X-Payments 1.0.4 CDSEO Pro EWD Hosting |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Hi,
1. Quote:
2. Quote:
They will link the php and tpl file using the smarty variables. EX: PHP-> you can find the smarty variable in each php file like this $smarty->assign("main","search"); TPL:In common templete There will be file called common_templete.tpl in skin1/root like this {else if $main eq search} {include file="tpl file name"} Quote:
__________________
MercuryMinds Technologies Development Team, Professional X-Cart Design, X-Cart Development, X-Cart Customization Services www.mercuryminds.com X-Cart Mailchimp Ecommerce 360 Plugin/integration module (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x) Smasher, a smart search engine for x-cart store (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x) One Page Checkout (OPC) - X-Cart module (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x) |
|||||||||
#3
|
|||||||
|
|||||||
![]() Thanks for the help.
So in skin1\customer\search.tpl this line of code: <form method="post" action="search.php" name="productsearchform"> Which of the 4 search.php files does it post the data to and is that connection made in the corresponding php file? Adam
__________________
Adam X-Cart Gold 4.4.5 - Live X-Cart Gold 4.1.11 - Retired X-Payments 1.0.4 CDSEO Pro EWD Hosting |
|||||||
#4
|
|||||||||
|
|||||||||
![]() hi,
If you currently in customer side then this form is submited to xcart root/search.php Quote:
__________________
MercuryMinds Technologies Development Team, Professional X-Cart Design, X-Cart Development, X-Cart Customization Services www.mercuryminds.com X-Cart Mailchimp Ecommerce 360 Plugin/integration module (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x) Smasher, a smart search engine for x-cart store (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x) One Page Checkout (OPC) - X-Cart module (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x) |
|||||||||
|
|||
X-Cart forums © 2001-2020
|