Results 1 to 9 of 9
  1. #1
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default 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/i...hp?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.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default 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

  3. #3
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: OK, where did I go wrong?

    Quote Originally Posted by schoolboy View Post
    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.

  4. #4
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default 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?

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: OK, where did I go wrong?

    Quote Originally Posted by mzimmers View Post
    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

  6. #6
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: OK, where did I go wrong?

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

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default 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 ) 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

  8. #8
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default 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.

  9. #9
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default 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.

 

 

Similar Threads

  1. what did i do wrong?
    By christayah in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 13 Oct 2015, 07:19 AM
  2. Define pages editor where did I go wrong?
    By jayarbee in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 11 Mar 2009, 02:13 PM
  3. Pricelist Contrib-Where did I go Wrong?
    By Names in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 17 Jun 2007, 04:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg