Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Code Collaboration / Require/Include Problems with custom coding in my Admin

Require/Include Problems with custom coding in my Admin

Started by g2ktcf on 7 Jan 2013, 7:19 PM · Views: 2,634

Results 1 to 6 of 6
7 Jan 2013, 7:19 PM
#1
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
635
Plugin Contributions:
0

Post #1 by g2ktcf

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

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

_sess_write()

So do I need to register my files somewhere? These two files are located in the same directory.

Thanks
Chris

7 Jan 2013, 7:38 PM
#2
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
635
Plugin Contributions:
0

Post #2 by g2ktcf

ah...this is v1.5.1 btw

8 Jan 2013, 12:48 AM
#3
drbyte avatar

drbyte

Sensei

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

Post #3 by drbyte

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.

25 Jan 2013, 6:21 PM
#4
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
635
Plugin Contributions:
0

Post #4 by g2ktcf

DrByte:

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

25 Jan 2013, 9:12 PM
#5
drbyte avatar

drbyte

Sensei

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

Post #5 by drbyte

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.

28 Jan 2013, 5:12 PM
#6
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
635
Plugin Contributions:
0

Post #6 by g2ktcf

DrByte:

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