| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Adding additional pages | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
![]() Quote:
Ok, so I added: Quote:
Quote:
Where does this code go? I'm using version 3.2.1 and I see no reference to Quote:
__________________
Regards Graham Site in Progress... (Version 3.2.2 Gold) |
|||||||
#12
|
|||||||
|
|||||||
![]() Quote:
You can ignore the above code, if it's not in your home.tpl. I think in your version of xcart, the above code is located in the common_templates.tpl file. It's not required for your "About Us.tpl" page. Regards,
__________________
Syddos Nothing is impossible, We just don't know how to do it ........Yet! Xcart 4.1.X PRO (Testing Platform: winXP Pro) Perl 5.8.7 (win32) WINAMP 1.6.3 (win32 server package. Includes the following) - phpMyAdmin v2.8.03 - MySql 5.0.21 - Apache 2.0.55 (win32) - php 5.1.4 - SQLitemanager 1.2.0 |
|||||||
#13
|
|||||||
|
|||||||
![]() Quote:
Thanks, syddos ![]() ![]() You gave me a push in the right direction. The code was in skin1/customer/home_main.tpl So if I'm correct for those using version 3.2.1 and are confused on how to add additional text pages, here's a clearer description than the one in the member account FAQ: Quote:
This works for text fine, but now all I need to do is work out how to include php pages such as a php helpdesk ![]() Any ideas? ![]()
__________________
Regards Graham Site in Progress... (Version 3.2.2 Gold) |
|||||||
#14
|
|||||||
|
|||||||
![]() So I'm with Graham, this is great for adding plain old text, but what if that text is data-driven? Is there any way to call data from a database and display it on cart pages
![]() |
|||||||
#15
|
|||||||
|
|||||||
![]() Hi,
I had this problem when I first set eyes on xcart, and tried my first mod, (August 2002), I quickly discovered that the include "../include/get_language.php"; statement in some php files is responsible for transferring text from the database to your web pages. WARNING! This file should only be called (included once) within any single web page request, otherwise you will get faults with messages like headers already started in ...../some other file Example. Quote:
Quote:
You will notice that home.php includes or requires auth.php, and that none of the files in auth.php is repeated in home.php. One thing I not tried yet, is to see if the order in which the require file.php or include/file.php matters. My website home page (not xcart home page) is generated by the xcart smarty/php code, and uses the xcart SQL database to store text and graphics. I also added a new $usertype of "V" (Visitor), with a "Enter Store" link from the website home page to xcart /customer/home page. One other note: My development site (not the one in the "member websites") has only one original xcart element on the page ("search/categories"), all other elements are accessed by links, I had to write php files to sit between my link and the called php files. Why? The called smarty and php files assigned variables etc to the elements, and expected these elements to already be on the page, with assigned variables storing data to be passed to the called php file. When the elements were not found, smarty would produce error after error. I'm no smarty/php expert, however when I need to do something, I learn just what code (smarty/php) I need to do the job, or copy an existing php function, change the arguments for my job and use that. I have been programming in JavaScript for some years, so I do understand a lot of the php code, it's smarty that normally trips me up. Regards,
__________________
Syddos Nothing is impossible, We just don't know how to do it ........Yet! Xcart 4.1.X PRO (Testing Platform: winXP Pro) Perl 5.8.7 (win32) WINAMP 1.6.3 (win32 server package. Includes the following) - phpMyAdmin v2.8.03 - MySql 5.0.21 - Apache 2.0.55 (win32) - php 5.1.4 - SQLitemanager 1.2.0 |
|||||||
#16
|
|||||||
|
|||||||
![]() Hi,
can anyone help me. I've tried and tried desperately to get the about us page to work as per: ************************************************** ********** Q: I want to add aditional text page to X-cart where I can place some additional info about my site, how it can be done? A: 1. First you have to edit template customer/home.tpl Create new menu item that will point to your page, you can put it for example after help menu section (the code between HTML comments): { include file="help.tpl" } <table border=0 cellPadding=5 cellSpacing=0 width=100%> <tr><td colspan=2 class="TableLeftElements"> About us </td></tr> </table> </td> <td width=20> </td> <td valign=top> Then add selector which will diplay your About Us template in the center of the cart: {if $smarty.get.mode eq "subscribed"} {include file="main/subscribe_confirmation.tpl"} {elseif $smarty.get.mode eq "about_us"} {include file="main/about_us.tpl"} {elseif $smarty.get.mode eq "unsubscribed"} {include file="main/unsubscribe_confirmation.tpl"} 2. Then create About Us template that will be displayed in the center, create file skin1/main/about_us.tpl and put the following lines there: { include file="location.tpl" last_location="About Us"} {capture name=dialog} Put your about us text here... {/capture} { include file="dialog.tpl" title="Information about our company" content=$smarty.capture.dialog extra="width=1 00%"} ************************************************** ********* I've edited the code in home.tpl and home_main.tpl as specified, and i have created a file "about_us.tpl" in folder skin1/main/about_us.tpl. All i'm getting is: "Parse error: parse error in /home/folder/public_html/V2/Cart/templates_c/N17/N1714041693/0.php on line 12" on the home page and the about us link refuses to work. What's wrong with it? Is there a typo error in the information given in the FAQ? I can't seem to be able to change the file CHMOD settings through CuteFTP either from 666 to 777. Does anyone else find this? I hope someone can help me, many thanks in advance, Mark ("Frustrated Carter!!! ![]() |
|||||||
#17
|
|||||||
|
|||||||
![]() Hi Mark,
I am sorry I just do not have the time to sort out your main problem but as I use cuteftp it would be churlish of me if I did not at least answer this side for you. CHMOD will only work if the server permits you to make chmod changes - pls contact your host as I have never found any problems with cuteftp and I have used various versions from 2.4 to 4.2 without this problem. Sorry I could not help you with your main problem - but I am sure one of the other members will go to your assistance. If you have not heard anything further by the end of the day then pm me and I will try and sort it out. Chris
__________________
Chris some carts at v4.4.5 security patched on a hardened managed unix server |
|||||||
#18
|
|||||||
|
|||||||
![]() Instead of modifing customer/home.tpl You can add the links to the skin1/help.tpl
Code:
This avoids what looks like a (but is actually the <table>) You can also, I assume, make a label in langauges on the provider section so the label for this section changes with the language. But your content on those pages will be in the language you wrote it in. I am thinking you could add a text in languages for each file you create ex about_us.tpl would contain Code:
|
|||||||
#19
|
|||||||
|
|||||||
![]() I make several pages and use the following method.
You can modify the page names (ie., information.tpl) to whatever you want, but it will probably be easier the first time to do it exactly as I show so it won't be so confusing. Here it is step by step: 1. Make a copy of help.tpl and call it information.tpl 2. Open the new information.tpl and change each link that has "help.php?section" to "home.php?mode" 3. Change each word/phrase after the "=" sign to whatever your topic is for that link. For instance, here is one of my links. Code:
4. Next, go ahead and put your language label there even though you haven't set it up in the language area. For instance, one of mine is Code:
5. Your entire new link should look like this: 6. Enter as many links as you need after the , but write down the word you used for the mode and also the label tag. You will need that info and it will save you from having to go back and forth. 7. Go to the language link in the admin menu, select English (if that's your primary language), and add each new label. Hint: you have to scroll down to the bottom of the page. ![]() 8. Next, go to your ./customer/main directory and make a new file including the extension ".tpl". For mine, I made one called whatis.tpl 9. Open up each new file. It should be totally blank. Put this: Code:
See where it says "last_location=What is a Battery"? That is what will show up in the location text that is present on each customer page. Where it says "title="What is a Battery?" will show in the colored dialog box that is also on every customer page. Both of these can be changed to whatever you decide later. 10. In the code above, you see the {$lng.txt_whatis} ? That's what we're going to fix next. That is the actual text that smarty pulls from your language text area. I called mine "txt_whatis". You can call yours whatever you want. So, go BACK to the language link in the admin menu and select English but this time we want to select the "text" pulldown in the Topic listing. Scroll down to add your file name, but be sure it's the exact same name as what is on the .tpl pages you just made. Write each label like "txt_whatis", NOT like this "$lng.txt_whatis . Write your description and value for each txt entry. The value will be all the text you want to show up on the page. HTML is acceptable here. 11. Go to customer/home_main.tpl and add this code for each link/page you just made Code:
12. Finally, the last thing you need to do is place your new section (information.tpl) on the customer page. Simply go to customer/home.tpl and drop your new section wherever you want it to show. I placed mine just about the Help section, so it looks like this: Code:
That's it. It's actually easier than all this sounds, but I wanted to go step by step to make it easy. The main thing is to make sure you are consistent with what you call things so as to avoid confusion. I suggest using the exact names as I did just to see how it works and than just go back and change to your likings. Hope this helps. |
|||||||
#20
|
|||||||||
|
|||||||||
![]() Great stuff and easy to grasp. One question, do you think this is Google-friendly? I know a lot of engines (not necessarily Google) choke on pages with ?'s and some ignore them because they tend to be the calling card of self-replicating pages.
Is there a way to create additional pages that preserve the xCart layout yet do not contain ?'s in the URL? While we'd prefer to have .html pages, we're concerned about preserving the session so that carts don't disappear. It's quite a balance between usability and search engine consideration, so any insight would be great! Heather |
|||||||||
|
|||
X-Cart forums © 2001-2020
|