Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contribution Issue


Hugo RSF

Recommended Posts

  • 3 months later...

I just installed "Extra pages-info box w/admin" 14Aug2011 with bug fix of the same date on a OSC2.3.1 installation with PHP5. No error messages or other issues with the store after installation.

 

For the index and contact us pages, it just adds the default text to the text I already had in the English language files. Deleting the default text in admin returned the pages to their original state.

 

It appears that creating a new page in admin doesn't really create a new page. Apparently I need to set up the page by creating a page file, language files and editing filename.php, bm_information.php etc THEN modify my new page file as per the contact_us example in the instructions (with the correct page type). Is that correct?

 

Also, I don't see a way to turn the page on/off from admin or a way to give a name for the link to the page in admin. What am I missing?

 

 

 

Link to comment
Share on other sites

  • 5 weeks later...

i'm using wamp server , and tried this on a oscommerce that locally installed , but i got this error

 

Fatal error: Cannot redeclare tep_set_page_status() (previously declared in C:\wamp\www\test\admin\extra_info_pages.php:20) in C:\wamp\www\test\admin\includes\languages\english\extra_info_pages.php on line 28

Link to comment
Share on other sites

i'm using wamp server , and tried this on a oscommerce that locally installed , but i got this error

 

Fatal error: Cannot redeclare tep_set_page_status() (previously declared in C:\wamp\www\test\admin\extra_info_pages.php:20) in C:\wamp\www\test\admin\includes\languages\english\extra_info_pages.php on line 28

Link to comment
Share on other sites

i'm using wamp server , and tried this on a oscommerce that locally installed , but i got this error

 

Fatal error: Cannot redeclare tep_set_page_status() (previously declared in C:\wamp\www\test\admin\extra_info_pages.php:20) in C:\wamp\www\test\admin\includes\languages\english\extra_info_pages.php on line 28

Link to comment
Share on other sites

Hi all,

 

First I want to applogize in advance for being such a newb, also I did use the search engine, both on here, and on google, and I did not find what I was looking for.

 

So here's the issue, I'm trying to install this and I followed the instructions. But now when I log into the admin console->Modules->Boxes up in the upper right corner it shows "+ Install Module (2)" I click that to install my module and it only shows one module "Info Pages" (which I think is the one I'm after), but on the right there's just a purple triangle (play button) and no installation option (box) like there normally is.

 

I'm affraid I screwed up somewhere, but I'm still not familiar with the orientation, nor where to look. How does OSC know there's awating modules for install, and where does it look for them?

 

Also I've tried 2 different computers, and both IE and FireFox (IE has a similar issue sometimes with adding "products").

 

Thankyou so much for your help.

 

CK

Link to comment
Share on other sites

  • 2 weeks later...

i am having this issue

 

Warning: Cannot modify header information - headers already sent by (output started at /home/iliofosg/public_html/eshop/downunder/includes/template_top.php:14) in /home/iliofosg/public_html/eshop/downunder/includes/functions/general.php on line 35

 

and with the headsent.php i am taking this

 

O/S = Linux.

downunder/includes/template_top.php has 74 lines.

The PHP start tag is on line 1.

The PHP end tag is on line 72.

Contents from start of file to the PHP start tag:

 

< ?php[0A]

 

-------------------------

Contents from PHP end tag to end of file:

 

?>[0A]

[0A]

< div[20]id="contentText">[0A]

 

 

Error Messages:

 

The closing PHP tag is not on the last line in the file.

 

 

-------------------------

Extended contents of the requested line [14] are:

 

< html[20]<?php[20]echo[20]HTML_PARAMS;[20]?>>[0A]

 

-------------------------

Raw contents of the requested line [14] are:

 

>

 

 

And hear is the code from template_top.php

 

 

<?php

/*

$Id$

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2010 osCommerce

Released under the GNU General Public License

*/

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<

 

html <?php echo HTML_PARAMS; ?>>

<

 

head>

<

 

meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<

 

meta name="robots" content="noindex,nofollow">

<

 

title><?php echo TITLE; ?></title>

<

 

base href="<?php echo HTTP_SERVER . DIR_WS_ADMIN; ?>" />

<

 

!--[if IE]><script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/excanvas.min.js'); ?>"></script><![endif]-->

<

 

link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/ui/redmond/jquery-ui-1.8.6.css'); ?>">

<

 

script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery-1.4.2.min.js'); ?>"></script>

<

 

script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/jquery-ui-1.8.6.min.js'); ?>"></script>

<?php

 

if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {

?>

<

 

script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/i18n/jquery.ui.datepicker-' . JQUERY_DATEPICKER_I18N_CODE . '.js'); ?>"></script>

<

 

script type="text/javascript">

$.datepicker.setDefaults($.datepicker.regional[

'<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);

</

 

script>

<?php

}

?>

<

 

script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.js'); ?>"></script>

<

 

link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<

 

script type="text/javascript" src="includes/general.js"></script>

<!-- boe box_social_bookmarks -->

<

 

link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/jquery.multiselect.css'); ?>">

<

 

link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/jquery.multiselect.filter.css'); ?>">

<

 

script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery.multiselect.min.js'); ?>"></script>

<

 

script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery.multiselect.filter.js'); ?>"></script>

<!-- eoe box_social_bookmarks -->

</

 

head>

<?php

 

// Discount Code 3.1.1 - start

 

if (basename($PHP_SELF) == FILENAME_DISCOUNT_CODES && isset($action) && $action == 'new') {

echo

'<body onload="onload();">';

}

else {

echo

'<body>';

}

 

// Discount Code 3.1.1 - end

?>

<?php

 

require(DIR_WS_INCLUDES . 'header.php'); ?>

<?php

 

if (tep_session_is_registered('admin')) {

 

include(DIR_WS_INCLUDES . 'column_left.php');

}

else {

?>

<

 

style>

#

contentText {

 

margin-left: 0;

}

</

 

style>

<?php

}

?>

<

 

div id="contentText">

 

 

What do i have to do?

Edited by apolyshow

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

  • 1 month later...

Hello everyone,

 

I have installed this contribution, and everything works ok but I don't know how to access the created pages with this contribution.

 

Any advice?

Find this post helpful? Click the 'Like this' button. :)

Link to comment
Share on other sites

I installed the 31 March 2012 version of this on a 2.3.1 store after installing CKEditor. Almost everything works fine after I modified the 'pages' table to make page_type a char(2) instead of Char(1) (thus getting up to 99 pages).

 

My two issues are:

 

1. contact_us.php is not getting into the page I create for it. Editing the home page works fine (the new additiions to the store show up under the stuff I added with this module), but I left it with page_type = 1. I want to have contact_us have page_type=11. The data on it is in both tables correctly, as far as I can tell. I edited contact_us.php as per the instructions except with page_type = 11. I can put stuff into the page via the admin tool, but the standard Contact Us form does not appear (actually nothing from contact_us.php appears). Apparently extra_info_pages.php is not connecting to contact_us.php at all. Seems like it should be something simple I'm missing. Any ideas??

 

2. I cannot make the text box for the external link active (on any of my pages) - even after clicking the 'External' button. The source code for the page says 'disabled' in that part of the form. Any ideas??

 

 

Thanks,

-Jerry-

Link to comment
Share on other sites

I resolved my issue concerning the inability to set an external link. For whatever reason the value for "intorext" in the database table "pages_description" for my page was set to zero. This value tells the system to use an external link (if set to 1) or not (if set to 0). Clicking the radio buttons had no effect although they should toggle. After editing the table to set the value of "intorext" to 1 rather than 0, I was able to put my link in the box, and update the page. This put the link into the database and all is well. I don't like to mess with the tables directly if I can help it, so I experimented further.

 

I found that if I

  1. click the "External" radio button
  2. click update
  3. edit the page again

the link can be entered into the box. Click update again and the external link works fine.

 

Apparently there is no automatic update of the database when the radio button is clicked - at least in the 31 March 2012 version.

 

-Jerry-

Link to comment
Share on other sites

I came up with a workaround for my issue with the Contact Us page (the workaround is described at the bottom of this post) and I think I have identified a problem with the code in catalog/includes/modules/boxes/bm_extrainfopage.php I find the following code segment there:

 

while ($page = tep_db_fetch_array($page_query)) {
  $rows++;
  $target="";
  if($page['link_target']== 1)  {
$target="_blank";
  }
  if($page['pages_title'] != 'Contact Us'){
$link = FILENAME_PAGES . '?pages_id=' . $page['pages_id'];
  }else{
$link = FILENAME_CONTACT_US;
  }
  if($page['intorext'] == 1)  {
$data .= '&--#60;tr&--#62;&--#60;td class="bg_list2"&--#62;&--#60;a target="'.$target.'" href="' . $page['externallink'] . '"&--#62;' . $page['pages_title'] . '&--#60;/a&--#62;&--#60;/td&--#62;&--#60;/tr&--#62;';
  }else {
$data .= '&--#60;tr&--#62;&--#60;td class="bg_list2"&--#62;&--#60;a target="'.$target.'" href="' . tep_href_link(FILENAME_PAGES, 'pages_id=' .$page['pages_id'], 'NONSSL') . '"&--#62;' . $page['pages_title'] . '&--#60;/a&--#62;&--#60;/td&--#62;&--#60;/tr&--#62;';
  }

 

I'm not expert enough to be editing code like this, but it looks to me like the $link string is being set up to define the page to display, but it is never used. If the title of the page is "Contact Us" $link gets assigned contact_us.php. The next 'if' clause goes to an external link (if intorext = 1) or to a page. Seems like if $link were used for the page rather than

FILENAME_PAGES, 'pages_id=' .$page['pages_id']

Contact Us would work properly. It's not a very good solution because if someone wanted to call the link "Write to Us" or something else, it wouldn't work.

 

I'd appreciate it if someone with more experience with this would take a look and see if that's the problem and fix it with an update. Perhaps it would be best to leave Contact Us out of it completely and provide instructions to have people load the page as I did in my workaround described below.

 

Here is a workaround:

 

Use Extra Info Pages to edit the Contact Us page and set /catalog/contact_us.php or /contact_us.php (depending upon where the file is located) as an external link. Note that this version of contact_us.php should NOT be edited with the instructions provided in Extra Info Pages installation file.

 

-Jerry-

Edited by jhaugen
Link to comment
Share on other sites

I also found another error in catalog/includes/modules/boxes/bm_extrainfopage.php

 

This code:

if($page['intorext'] == 1)  {
               $data .= '<tr><td class="bg_list2"><a target="'.$target.'" href="' . $page['externallink'] . '">' . $page['pages_title'] . '</a></td></tr>';
           }else {
               $data .= '<tr><td class="bg_list2"><a target="'.$target.'" href="' . tep_href_link(FILENAME_PAGES, 'pages_id=' .$page['pages_id'], 'NONSSL') . '">' . $page['pages_title'] . '</a></td></tr>';
           }

outputs html with a null target (i.e. <a target="" . . . </a>) when displaying the list of links in the info box. This generates an html error for every link (except for external links where the value of $target is "_blank"). The fix is to change this:

}else {
               $data .= '<tr><td class="bg_list2"><a target="'.$target.'" href="' . tep_href_link(FILENAME_PAGES, 'pages_id=' .$page['pages_id'], 'NONSSL') . '">' . $page['pages_title'] . '</a></td></tr>';
           }

to this

}else {
               $data .= '<tr><td class="bg_list2"><a  href="' . tep_href_link(FILENAME_PAGES, 'pages_id=' .$page['pages_id'], 'NONSSL') . '">' . $page['pages_title'] . '</a></td></tr>';
           }

 

That is, just remove the target attribute from the else clause that lists all the links that are not external.

Link to comment
Share on other sites

  • 1 month later...

I download several version since 2011-08-14,

only this one show link in backend admin, but it did not show me the page type or options,

and it make the contact us in the front end web page funny!

 

Tried to reinstalled with 2012-03-31 version,

but then it said catalog/extra_info_pages.php fatal error with Line 509

 

Is there any update full package that actually works ok?

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Hi!

 

I got a minor problem here. I installed this addon, and applied all the changes for the English file for the German file as well. However, it seems my welcome page only gets shown up for the German language, but not the English one.

 

http://imperiumclan.bplaced.net/richard/index.php?language=de

http://imperiumclan.bplaced.net/richard/index.php?language=en

 

Any clue where the error could lie? If I can't fix this, I just disable EN language maybe, I doubt we get many non-Germans to our shop anyways.

Edited by Basinator
Link to comment
Share on other sites

I found something out about my problem.

 

For the homepage itself: I created a new languagefor testing, copied the files and folder from the english language and suddenly I had a homepage text! Yet still no success on the original EN language. Guess I can re-create the EN language to fix this.

 

I still don't know where the error lies.

Link to comment
Share on other sites

  • 1 month later...

this is not in index.php

 

 

REPLACE
if (tep_not_null(TEXT_MAIN)) {
?>
<div class="contentText">
<?php echo TEXT_MAIN; ?>
</div>
<?php
}
WITH
echo $pagetext;

 

If You have added Modular Front Page contribution, TEXT_MAIN is in 'includes/modules/frontpage/text_main.php'

Simply add to function execute():

    $body_text .= '  <div class="contentText">' . PHP_EOL;
    $body_text .= $pagetext . PHP_EOL;
    $body_text .= '  </div>' . PHP_EOL;

and change this line in this function:

  global $oscTemplate, $language, $PHP_SELF, $cPath;

to:

  global $oscTemplate, $language, $PHP_SELF, $cPath, $pagetext;

(Added ', $pagetext' at the end of line)

Link to comment
Share on other sites

Hello everyone,

 

I have installed this contribution, and everything works ok but I don't know how to access the created pages with this contribution.

 

Any advice?

 

You have to install new BOX 'Info Pages' in Your Admin Panel -> Modules -> Boxes.

All links to Your pages You have created will be in this box

Link to comment
Share on other sites

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