Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2011
    Location
    Lumberton, TX
    Posts
    530
    Plugin Contributions
    0

    Default Require/Include Problems with custom coding in my Admin

    I am working on a modification for my Admin Orders page. This is really a separate PHP file that runs just before the footer. However, I have

    Code:
    <?php require(DIR_WS_INCLUDES . 'myfile.php'); ?>
    But it does not work.....if I change 'myfile.php' to 'footer.php' the next line executed in is 'footer.php'. When the first version goes through i get send to a another zencart function

    Code:
    _sess_write()
    So do I need to register my files somewhere? These two files are located in the same directory.

    Thanks
    Chris

  2. #2
    Join Date
    Feb 2011
    Location
    Lumberton, TX
    Posts
    530
    Plugin Contributions
    0

    Default Re: Require/Include Problems with Admin

    ah...this is v1.5.1 btw

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Require/Include Problems with Admin

    In an MVC structure it's odd to add business logic execution in the middle of template output.
    Need more information about what you're actually trying to do. What's your myfile.php script actually doing? What's the business problem you're trying to solve with it? Why are you trying to run it "just before the footer"?
    .

    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
    Feb 2011
    Location
    Lumberton, TX
    Posts
    530
    Plugin Contributions
    0

    Default Re: Require/Include Problems with Admin

    Quote Originally Posted by DrByte View Post
    In an MVC structure it's odd to add business logic execution in the middle of template output.
    Need more information about what you're actually trying to do. What's your myfile.php script actually doing? What's the business problem you're trying to solve with it? Why are you trying to run it "just before the footer"?
    I am trying to create a routine that allows me to store new information about an order (special packing information) that I can input and save in the database. I have found a temporary workaround for the initial question....but now my custom classes cannot be used due to the same problem. My development is now in full stop....

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Require/Include Problems with Admin

    Let's see the code.
    .

    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.

  6. #6
    Join Date
    Feb 2011
    Location
    Lumberton, TX
    Posts
    530
    Plugin Contributions
    0

    Default Re: Require/Include Problems with Admin

    Quote Originally Posted by DrByte View Post
    Let's see the code.
    hmmm....well, I fixed it. And I am really embarrassed to say what happened lol. All I can say is run time errors are a PITA....

 

 

Similar Threads

  1. Re coding Site map feature to include all products
    By ParseRaider in forum General Questions
    Replies: 14
    Last Post: 20 Feb 2016, 02:05 PM
  2. Problems with Numinex Mod, can somebody help me with coding...
    By strugglingnovice in forum General Questions
    Replies: 5
    Last Post: 23 Sep 2013, 05:42 AM
  3. Coding Help with require(DIR_WS_MODULES
    By haredo in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 27 Apr 2009, 10:48 AM
  4. Problems with sales & possible coding error?
    By karenkte in forum General Questions
    Replies: 2
    Last Post: 16 Jun 2008, 11:19 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR