Zen Cart Logo
Forums / Basic Configuration / Shopping cart content

Shopping cart content

Views: 1,748

Results 1 to 14 of 14
2 Jan 2013, 3:48 PM
#1
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Shopping cart content

On the shopping cart it says:
'You may want to add some instructions for using the shopping cart here. (defined in includes/languages/english/shopping_cart.php)'

Don't these type of revisions require override files for custom template? Or changes are made in includes/languages/english/shopping_cart.php?

If an override is not necessary, what is the reason for includes/languages/english/Your_template/ folder, which contains and "emty.txt" file?

Using Zen Cart 1.5.1

2 Jan 2013, 4:04 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shopping cart content

The original language file is displayed in the text so that you can locate the file that you need to change and, yes, you should use your templates and overrides for your custom changes ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Jan 2013, 4:34 PM
#3
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Shopping cart content

Good to hear from you again Linda. Please excuse me as my brain is not functioning properly this morning!

So is it safe to say, for any change whatsoever (from simple text to code change), one should create an override structure?

And in this case the override should be includes/languages/english/Your_template/shopping_cart.php.

Using Zen Cart 1.5.1

2 Jan 2013, 4:38 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Shopping cart content

Yes, and yes. Some files can't be overridden, but it's a good idea to use the override function when possible.

2 Jan 2013, 4:41 PM
#5
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Shopping cart content

stevesh:

Yes, and yes. Some files can't be overridden, but it's a good idea to use the override function when possible.
Thank you.

Using Zen Cart 1.5.1

2 Jan 2013, 6:52 PM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Shopping cart content

The GENERAL RULE for whether a file has an over-ride capability is to check if there is a "classic" folder visible.

Wherever you see a "classic" folder (be it in LANGUAGES, MODULES or TEMPLATES), you can safely put in another folder named after your CUSTOM folder set.

EG:

/includes/modules/classic/

allows for:
/includes/modules/YOUR_CUSTOM_TEMPLATE_NAME/

and

/includes/languages/english/classic/

allows for:
/includes/languages/english/YOUR_CUSTOM_TEMPLATE_NAME/

and

/includes/languages/english/html_includes/classic/

allows for:
/includes/languages/english/html_includes/YOUR_CUSTOM_TEMPLATE_NAME/

NB: Do not RE-NAME "classic"... ADD your custom folder at the same directory level...

20 years a Zencart User

2 Jan 2013, 7:06 PM
#7
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Shopping cart content

Great advise.

I have not added any custom templates. I am working and revising the stock template from 1.5.1 called "Classic Contemporary Green" and as you know the template directory is called "classic".

Thank you.

Using Zen Cart 1.5.1

2 Jan 2013, 7:17 PM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Shopping cart content

Kevin205:

Great advise.

I have not added any custom templates. I am working and revising the stock template from 1.5.1 called "Classic Contemporary Green" and as you know the template directory is called "classic".

Thank you.

ER... not a good idea...

CLASSIC is a useful diagnostic tool... when a CUSTOM template gives problems, reverting to "classic" often helps point to the problem.

You can CLONE classic and then build your own template (with overrides), but it is not a good idea to tamper with classic.

20 years a Zencart User

2 Jan 2013, 7:19 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Shopping cart content

You should use a separate template folder for your custom template, even if it starts from the Classic design. Copy all /classic/ folders to /your_template/ folders (whatever name you want to use) and start with new modifications there.

You could then upload new copies of /classic/ folders from a fresh download of Zen Cart, to give you a clean Classic template to use in debugging if necessary.

2 Jan 2013, 7:39 PM
#10
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Shopping cart content

schoolboy:

ER... not a good idea...

CLASSIC is a useful diagnostic tool... when a CUSTOM template gives problems, reverting to "classic" often helps point to the problem.

You can CLONE classic and then build your own template (with overrides), but it is not a good idea to tamper with classic.

gjh42:

You should use a separate template folder for your custom template, even if it starts from the Classic design. Copy all /classic/ folders to /your_template/ folders (whatever name you want to use) and start with new modifications there.

You could then upload new copies of /classic/ folders from a fresh download of Zen Cart, to give you a clean Classic template to use in debugging if necessary.

Since I have been working on it for a while now, I guess I have to rename "classic" to "My_Custom_Template" and possibly re-install the the "classic" template?

Any suggestion on the best way to accomplish that task?

Thank you.

Using Zen Cart 1.5.1

2 Jan 2013, 7:48 PM
#11
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Shopping cart content

gjh42:

You should use a separate template folder for your custom template, even if it starts from the Classic design. Copy all /classic/ folders to /your_template/ folders (whatever name you want to use) and start with new modifications there.

You could then upload new copies of /classic/ folders from a fresh download of Zen Cart, to give you a clean Classic template to use in debugging if necessary.

I guess you answered my question already. Thanks.

Using Zen Cart 1.5.1

2 Jan 2013, 8:07 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Shopping cart content

Okay, good to see you on your way! Be sure to remember, when copying/changing foldernames/whatever method you use, to update the /includes/templates/your_template/template_info.php file with distinct info for your template name, so you can distinguish it in admin > Tools > Template Selection.
Refer to the tutorials about template creation for more details...

2 Jan 2013, 8:20 PM
#13
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Shopping cart content

Kevin205:

Since I have been working on it for a while now, I guess I have to rename "classic" to "My_Custom_Template" and possibly re-install the the "classic" template?

Any suggestion on the best way to accomplish that task?

Thank you.

Not quite this straight-forward... A major "controller" of how the site interprets what template is being applied is the template_info.php file - AND this integrates with a few things in the database too (such as layout boxes).

SO... here's the procedure...

  1. RE-NAME all the current CLASSIC folders to a name of your choice (and I mean ALL the folders - so navigate through ALL LEVELS of languages : modules : templates and wherever you see classic, re-name it. (The languages folder is the one with the most... of course the templates folder will only have ONE instance of classic.

Then, go to includes/templates/YOUR_RENAMED_TEMPLATE/template_info.php (and make the obvious changes).

<?php
/**
 * Template Information File
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: template_info.php 2306 2005-11-05 21:34:28Z wilt $
 */
$template_name = 'My New Template';
$template_version = 'Version 1.0';
$template_author = 'ME - 2013';
$template_description = 'This is My New Template';
$template_screenshot = '';
?>

BEFORE you do any thing else, you need to PUT BACK the core classic folders and files, so open your unzipped copy of zencart program, and FTP all the classic folders back to their relevant locations.

NOW... when you go to you site, you will see it back to CORE CLASSIC, and it will stay that way until you select your NEW TEMPLATE under the TOOLS >>> TEMPLATES menu option.

After you select your NEW template, you may need to RE_SET the layout boxes. (sideboxes). This is done under layout boxes controller and just scroll to the bottom of that screen and click RESET

20 years a Zencart User

3 Jan 2013, 11:55 PM
#14
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Shopping cart content

schoolboy:

After you select your NEW template, you may need to RE_SET the layout boxes. (sideboxes). This is done under layout boxes controller and just scroll to the bottom of that screen and click RESET

Your last advise saved me hours of going through files and code, trying to figure out why my boxes are not showing up. No way I would have remembered to go to the "Layout Boxes Controller" under Admin's Tools, to turn them back on.

Everything went smoothly and looking good. it took about 30 minutes to backup, transfer and regenerate. I can now fall back on the original "classic" files if I have to. Thank you.

Using Zen Cart 1.5.1