X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   edit home page off line (https://forum.x-cart.com/showthread.php?t=43543)

swifty1 11-10-2008 02:12 AM

edit home page off line
 
Hi can anyone tell me how i can take my home page (which uses the built in wysiwyg for the layout) off the server then be able to edit the layout etc on my local hard drive before uploading back to my server so as i can play around with the look etc without interfering with the live site, only updateing the home page once i am happy with the look.

JWait 11-10-2008 07:59 AM

Re: edit home page off line
 
I'm not sure what you mean by "home page", are you referring to home.php? Since that is actually made up of several templates I don't understand what you mean by using a WYSIWYG editor. Please explain.

swifty1 11-10-2008 08:18 AM

Re: edit home page off line
 
By the home page i mean the page that loads up first customer/home.tpl, i understand that this page is made up of several templates ie head, bottom and all the side menu box templates. The central area below the company logo has a wysiwyg applied to it i assume by the company that set the site up, they did this so that i was able to change the layout table around, upload images and change the text etc.
I can change the look of this area in webmaster mode but for me to save the changes that i do will also change the live site which i do not want until i am satisfied with the new layout is ok which may take me a few days to do, so what i would like to do is be able to work on the home.php wysiwyg tables etc then when i am satisfied upload the new home wysiwyg layout to the live server.
I hope this makes sense.

JWait 11-10-2008 08:58 AM

Re: edit home page off line
 
Ok. It sounds like the area you are talking about is skin1/customer/main/welcome.tpl, and probably the $lng.txt_welcome language variable.

Take a look at skin1_original/customer/main/welcome.tpl and compare it to skin1/customer/main/welcome.tpl. If there are no changes then you don't need to worry about that.

For $lng.txt_welcome, in admin click on "languages" then chose your language from the drop down box at the top of the page. Next enter txt_welcome as the filter. You should see $lng.txt_welcome as one of your results. Copy what is in the box to your favorite text editor. Add <html>and <body> to the top, and </body>and </html> to the bottom and save as a html file. You can then open the file in your web browser to see what that portion of the home page will look like. When you are done editing, you can copy your file between the "body"s and paste it into the $lng.txt_welcome area in the admin "languages" section.

swifty1 11-10-2008 09:25 AM

Re: edit home page off line
 
Fantastic it is so easy when you know how a million thanks for that one JWAIT you know your x-cart.

Is there a proper way to delete the file that is on the server before i copy and paste the new updated file.

Checked out skin1 against skin1/original and there is no difference what if there had been a difference here

JWait 11-10-2008 10:48 AM

Re: edit home page off line
 
Did you find the problem?
You don't need to worry about the old file as the new one will over-write it (provided it has exactly the same name). One thing I usually do is rename the file I am replacing to filename.tpl-old and upload the new one using FTP. That way if you have a problem you can just rename the old one back like it was and the problem will be gone, once you clear the template cache.

swifty1 11-19-2008 03:55 AM

Re: edit home page off line
 
Hi J Wait i have saved the file and tried to view in my browser putting the DOCTYPE etc at the top, enclosing the code in <html> and <body> tags but all i get is the code text line for line, no layout of page etc any ideas as to why.
Pulling my hair out as i have tried everything that i can think of.

JWait 11-19-2008 04:17 AM

Re: edit home page off line
 
If "the file" is one of x-cart's templates it is not html. The templates usually have smarty tags throughout them so they can't be displayed as html. If you are trying to edit the "$lng.txt_welcome" language variable,then you can do as I suggested earlier...
"For $lng.txt_welcome, in admin click on "languages" then chose your language from the drop down box at the top of the page. Next enter txt_welcome as the filter. You should see $lng.txt_welcome as one of your results. Copy what is in the box to your favorite text editor. Add <html>and <body> to the top, and </body>and </html> to the bottom and save as a html file. You can then open the file in your web browser to see what that portion of the home page will look like. When you are done editing, you can copy your file between the "body"s and paste it into the $lng.txt_welcome area in the admin "languages" section."

If you are going to be doing a lot of editing, and don't want to disturb the live site, then maybe you should create a clone of your live site in a sub-folder. Remember to clone your database also, and change the new config.php to point to the proper locations. Also, block the sub-folder from search engines by disallowing it in robots.txt.

swifty1 11-20-2008 02:20 AM

Re: edit home page off line
 
I have an upto date copy of my site on my local hard drive, is it possible to use this copy to edit and view with my browser locally.

JWait 11-20-2008 04:05 AM

Re: edit home page off line
 
You can, and a thread discussing this subject is here http://forum.x-cart.com/showthread.php?t=12496

I have never done it, and it doesn't address some issues that can only be discovered running the exact same configuration as the live site does. It should work fine for simple template edits though.


All times are GMT -8. The time now is 06:52 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.