Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
Guest

Define Main Page Contribution

Recommended Posts

Guest

I installed the "define mainpage mod and now I get this error

 

 

Warning: Failed opening 'includes/languages/english/FILENAME_DEFINE_MAINPAGE' for inclusion (include_path='') in /home/cellar/public_html/catalog/index.php on line 313

 

Can anyone help me?

Share this post


Link to post
Share on other sites

This may sound stupid, but, did you double check to make sure everything is installed and proper changes have been made??? I just installed it yesterday and now it works fine. You do need to be careful when editting the text...

Share this post


Link to post
Share on other sites
Guest

Installation instructions Error:

 

**CATALOG STEP 2 --> DEFINE catalog/includes/filenames.php:

 

// define_mainpage

define('FILENAME_MAINPAGE', 'define_mainpage.php');

// define_mainpage_eof

 

REPLACE WITH:

 

// define_mainpage

define('FILENAME_DEFINE_MAINPAGE', 'define_mainpage.php');

// define_mainpage_eof

 

Cheers Lee

Share this post


Link to post
Share on other sites
Guest

Thanks MaxiDVD, that was the problem :D

Share this post


Link to post
Share on other sites
Guest

actually that fixed the problem on the catalog end but in the admin im getting this message: Parse error: parse error in /home/cellar/public_html/catalog/admin/includes/boxes/catalog.php on line 40

Share this post


Link to post
Share on other sites
Guest

yeah, you missed the bracket in the file,

 

Check admin/includes/boxes/catalog.php

 

or replace yours with this

 

<?php

/*

$Id: catalog.php,v 1.21 2003/07/09 01:18:53 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- catalog //-->

<tr>

<td>

<?php

$heading = array();

$contents = array();

 

$heading[] = array('text' => BOX_HEADING_CATALOG,

'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'));

 

if ($selected_box == 'catalog') {

$contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DEFINE_MAINPAGE . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>');

}

 

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- catalog_eof //-->

Cheers Maxidvd

Share this post


Link to post
Share on other sites
Guest

ok, that fixed the error in the admin, but when I click on the "define mainpage" link I get a "Page cannot be found"

Share this post


Link to post
Share on other sites
Guest

Make sure you have uploaded the file named define_mainpage.php to the admin folder,

 

Sounds like its not there..

"Page cannot be found"

 

Cheers Lee :lol:

Share this post


Link to post
Share on other sites
Guest

It's there I double checked

Share this post


Link to post
Share on other sites
Guest

Next would be to check file permissions. It would need to be world readable.

 

Good luck,

Matt

Share this post


Link to post
Share on other sites
Guest

checked that too and the permissions are set fine?

Share this post


Link to post
Share on other sites
Guest

Checked permissions and they are fine.

Share this post


Link to post
Share on other sites
Guest

I'm still trying to get this to work. I see the auther updated it in the contribution section of this site but the download zip file is empty.

 

My problem is still in the admin the "mainpage link" goes t oa page cannot be found. The actual link points to a FILENAME_DEFINE_MAINPAGE

 

When go directly to the define_mainpage.html in the browser I get a screen that has an error that says TEXT_FILE_DOES_NOT_EXIST

 

if anyone can help me out I'd appreciate it

Share this post


Link to post
Share on other sites
Guest
The actual link points to a FILENAME_DEFINE_MAINPAGE

you need to do this:

 

**ADMIN

===============================================

ADD this line

 

define('FILENAME_DEFINE_MAINPAGE', 'define_mainpage.php'); // DEFINE MAINPAGE

 

TEXT_FILE_DOES_NOT_EXIST

You also need to do this:

 

**CATALOG ===============================================

Must SET Full Read Write RWRWRW 777 Permission on this file!!

===============================================

 

catalog/includes/language/(YOUR_LANGUAGE_FOLDER)/define_mainpage.php

 

This information is from the instructions file

Share this post


Link to post
Share on other sites
Guest

Thanks for the help. I just went ahead and downloaded the new version and reinstalled it and now everything works fine. Thanks again for taking the time :D

Share this post


Link to post
Share on other sites
Guest

Well I thought I had it. Everything works now in the admin. It even lets me change and save in the admin but when I save and go to the catalog end it reads this error on the homepage Parse error: parse error in /home/cellar/public_html/catalog/includes/languages/english/define_mainpage.php on line 27

 

 

any suggestions?

Share this post


Link to post
Share on other sites
Guest

Open the define mainpage via admin, you need to get rid of "

 

$mainpage_title = "We've just installed the" module!";

$mainpage_info = "

" module v1.3 by Matthijs (mattice@xs4all.nl)

<p>

This module demonstrates how easy it can be to adapt existing code in OSC.<br>

All I had to do was add one single line to define_languages.php (admin) to make

sure it always looks for the mainpage.php file. Obviously I had to then implement it

in the Admin & Catalog side, but that's not a big deal as you've just found out.<p>

You can edit the contents of this file from within the Admin ( -> CATALOG -> DEFINE MAINPAGE)<br>

For other, less advanced layouts choose either German or Spanish from the language menu. (Provided you've installed

those languages)<p>If you can't open/edit the /[language]/mainpage.php file you should probably set the right permissions. You'll get a warning anyway.

<p>Todo? Future plans? World peace through superior fire power... ehmm.. <br>no I mean a preview option ;)<br>

And perhaps make a few templates for the layout...<p>

I'd appreciate an e-mail if you use this, I'm curious...<br>

Later,<br>

Mattice

"

 

Change to

 

$mainpage_title = "We've just installed the Define Mainpage module!";

$mainpage_info = "

Define Mainpage module v1.3 by Matthijs (mattice@xs4all.nl)

<p>

This module demonstrates how easy it can be to adapt existing code in OSC.<br>

All I had to do was add one single line to define_languages.php (admin) to make

sure it always looks for the mainpage.php file. Obviously I had to then implement it

in the Admin & Catalog side, but that's not a big deal as you've just found out.<p>

You can edit the contents of this file from within the Admin ( -> CATALOG -> DEFINE MAINPAGE)<br>

For other, less advanced layouts choose either German or Spanish from the language menu. (Provided you've installed

those languages)<p>If you can't open/edit the /[language]/mainpage.php file you should probably set the right permissions. You'll get a warning anyway.

<p>Todo? Future plans? World peace through superior fire power... ehmm.. <br>no I mean a preview option ;)<br>

And perhaps make a few templates for the layout...<p>

I'd appreciate an e-mail if you use this, I'm curious...<br>

Later,<br>

Mattice

"

 

Something to do with the oscommerce stripslashes function, will look at it later.

 

If you remove the double quotes " completely the error will disapear.

Share this post


Link to post
Share on other sites
Guest

thanks that did the trick

Share this post


Link to post
Share on other sites
Thanks for the help. I just went ahead and downloaded the new version and reinstalled it and now everything works fine. Thanks again for taking the time :D

What is the link to the new version of the contrib?


Knowledge is Power!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×