aaronjmorgan:
Firstly... the mainpage.php is one of the pages that is listed in "define pages editor" - it controls the content that comes after "welcome guest log in now" on the homepage of the store
Sorry if I appear a little pedantic, but on my install (and pretty much all others I've seen), there's one called 'define_main_page.php', Is that the one you are referring to? (Just need to be sure we're both on the same page).
aaronjmorgan:
- Where did you obtain this 'news script' ... can you provide us some information where you obtained it.
I obtained the news script from : http://newsscriptphp.com/
Bummer. Thats a commercial offering. I was hoping I would be able to d/load and install it on one of my test sites to see if it gave me the same problem.
aaronjmorgan:
the code I am trying to add is :
<?php include("/rootpathgoeshere/store/Newz/newstop.php"); ?>
Have you verified that this path exists (it probably does, else I'd expect a different error than the one being reported). Just to be sure though, these paths are case sensitive "Newz" and "newz" are different and not interchangeable.
Also, if your store resides in "....../public_html/store/" the "/rootpathgoeshere/" would/should be simply "/store/" so the php code would read
<?php include("/store/Newz/newstop.php"); ?> and you will/should have a folder called "Newz" listed along with the zencart default folders called images. includes, editors, youradmin, doc. cache.....
aaronjmorgan:
- Where did you get the information that you need to add PHP into the define page?
I want the latest news articles to preview as a list on my homepage... in order to get it on my homepage it makes sense to add the php code using define pages editor mainpage.php
OK, I was hoping for a link so I could follow the same instructions. Since I don't have a copy of the news software itself though this is a bit of a moot point.
aaronjmorgan:
im totally confused as to why its totally erasing the right sidebar... and why im getting the error in the logs folder
These are quite probably related, and could be caused if there is something amiss with any of the PHP code that is executed before various values needed for the latter functions are initialised. On the other hand they could also be totally unrelated to the problem with your newsfeed code. At this stage I consider them unimportant and suspect that when the problem with the newzfeed has been resolved then these other errors will also resolve themselves. If they don't, they will then need to be treated as a different issue entirely.
The idea is to concentrate on one problem at a time :)
So, in addition to checking the file paths, etc, my next question is when adding the PHP using the define pages editor are you using the 'plain text' editor, the CKEditor, the HTMLeditor, or something else entirely? Actually I don't really need to know this, but you need to know that in order to add the PHP code you will need to be using the 'plain text' editor (or the 'Source' function of the CKEditor). All of the 'graphical' editors will mess with the code in one way or another.
And on that note, what I need you to do next (mainly to give an idea of where we are at, and where to go next) could I get you to replace the code you are adding
<?php include("/rootpathgoeshere/store/Newz/newstop.php"); ?>
with
<?php echo "Hello World"; ?>
The results I'm expecting is that when you view the main page now you will see the text "Hello World" and your right sidebar will correctly display, and if you are lucky, those messages in your error logs will also go away (I suggest you delete the current error logs before doing this to make any new errors easy to see).
Please report your findings so that I/we can determine your next step.
Cheers
RodG
NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.
Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.