Forums / Templates, Stylesheets, Page Layout / OK, where did I go wrong?

OK, where did I go wrong?

Locked

Views: 831

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
7 Mar 2010, 5:17 PM
#1
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

OK, where did I go wrong?

I needed to make a change to /includes/modules/pages/shopping_cart/header_php.php.

Per my understanding of the instructions in:

https://www.zen-cart.com/tutorials/index.php?article=143

I created a file includes/modules/CUSTOM/pages/shopping_cart/header_php.php.

But my changes in that file aren't being picked up.

What did I do wrong?

Thanks.

7 Mar 2010, 5:23 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

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

Re: OK, where did I go wrong?

I don't think there is an override for PAGES in the modules directory.

What I do is rename the ORIGINAL to a bak file

(header_php.bak)

Then edit a COPY of it which is saved in the same folder, under the php extension...

20 years a Zencart User

7 Mar 2010, 5:27 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: OK, where did I go wrong?

schoolboy:

I don't think there is an override for PAGES in the modules directory.
Correct.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Mar 2010, 5:29 PM
#4
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: OK, where did I go wrong?

Ahh...OK, that would explain it, then. Thanks, guys.

Schoolboy: doesn't your method for doing this risk losing your changes during an upgrade?

7 Mar 2010, 5:39 PM
#5
schoolboy avatar

schoolboy

Totally Zenned

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

Re: OK, where did I go wrong?

mzimmers:

Ahh...OK, that would explain it, then. Thanks, guys.

Schoolboy: doesn't your method for doing this risk losing your changes during an upgrade?

Only if I fail to keep written records of what I've done, and a COPY of the edited file in an appropriate location on my local machine...

20 years a Zencart User

7 Mar 2010, 5:44 PM
#6
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: OK, where did I go wrong?

Hmm...written records, you say? Yeah, I suppose that would have been a good idea...

7 Mar 2010, 5:51 PM
#7
schoolboy avatar

schoolboy

Totally Zenned

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

Re: OK, where did I go wrong?

I handle SCORES of sites... without a well-kept notebook (has now become a set of files) I would be well-and-truly lost...

Get into the habit of noting down what you do. You'll be surprised at how quickly you forget what's been done and where.

Another technique is to create a full MIRROR of ALL FILES on your local machine - - - in effect, a DUPLICATE of all the FILES in the current working website.

What I now do is make edits to the LOCAL copies first, and then FTP them to the server, after re-naming the server's copy to .bak as described above.

In this way (editing the LOCAL file first), the version of any file on my local drive is as up-to-date as whatever is on the server.

This is useful from a number of points of view...

  1. If I make errors in my edits (as I OFTEN do :blush:) then the server version is ORIGINAL and "un-sullied" - and I can try again.

  2. I ALWAYS have a FULL CURRENT BACKUP of all files on my local machine - and you never know when that can be useful to you. A crashed server will soon tell you, though!

20 years a Zencart User

7 Mar 2010, 8:34 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: OK, where did I go wrong?

... and NEVER keep the ".php" extension when renaming a backup file!!!!

ie: header_php.php ---> header_php.bak == GOOD
ie: header_php.php ---> header_php_original.php ==== BAD

Similar with stylesheets. If renaming a stylesheet file, DO NOT call it "styleXXXXXXXX.css", because that's the pattern that automatically is loaded by the system.
Use .bak instead of .css

And .bak instead of .js

etc.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Mar 2010, 3:57 AM
#9
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: OK, where did I go wrong?

Actually, you can create the folder for an override of "pages" even though it won't be used, but you can use it just to store a copy of the files you changed so that you can refer to them after and upgrade/update and copy your modifications to the new files.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey