Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Define Main Page Contribution


Guest

Recommended Posts

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?

Link to comment
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...

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 ([email protected])

<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 ([email protected])

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

Link to comment
Share on other sites

  • 8 months later...
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!

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...