Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Override for /includes/classes folder?

    Hi,

    I'm making changes to my /includes/classes/order.php file.

    Is it possible to use the override system for this directory? As in:

    /includes/classes/<mytemplate>/order.php ?

    The above does not work BTW... is there another way, or is this CORE EDIT only?

    Thanks!

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

    Default Re: Override for /includes/classes folder?

    Anywhere you see a /classic/ folder, you can create a folder for your custom template. Since there's no /classic/ folder in /includes/classes/, the answer is no, so you have to edit core files.

    I suggest you create the override folder anyway and save your changed version to it. You'll end up with 2 copies of the same file one in /includes/classes/ and one in /includes/classes/YOUR_TEMPLATE/. This will protect your changes during an upgrade/update and allow you to compare your changes to the new version of the file and recreate them without having to think everything through again.
    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

  3. #3
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Re: Override for /includes/classes folder?

    Thanks Afo, that's a good idea. I was recently looking at what it'd take to upgrade to 1.3.9 and boy have I even done a LOT of core customizations! Wish I had taken or come across this idea earlier. And NO, bad me didn't keep a detail change log

  4. #4
    Join Date
    Jan 2004
    Posts
    66,440
    Plugin Contributions
    279

    Default Re: Override for /includes/classes folder?

    The better approach to editing classes is to not edit them at all, but to instead use notifier/observer addons to intercept class code at specific places, thus not having to touch original core code at all. v1.3.9 made several improvements to that infrastructure, so adapting your current customizations to be done with observers will be more efficient now. Granted, you'll still need to deal with your current changes as part of your current upgrade.
    .

    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.

 

 

Similar Threads

  1. What does this (admin/includes/classes/transliteration/) folder do?
    By mikecnz in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 4 Nov 2010, 02:17 AM
  2. Override Directory for /includes Root ?
    By dmm2020 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Mar 2009, 05:01 PM
  3. Override for includes/modules/pages?
    By dbrewster in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 27 Jan 2007, 04:51 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