Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Extra Info Pages Contribution


Guest

Recommended Posts

Posted

I've added contribution 2021 Extra pages-info box w/admin to my site. Admin side does exactly what it claims to but store side is a different matter. The extra box appears, as it should, and the links inside said box appear, as they should...... but click on any pages and I get

The requested URL was not found on this server.

 

Can anyone out there point me in the right direction? I'm really stumped as to why this is happening.

Posted

Without a URL to visit, or an example of a "bad link", it's going to be tough to solve....

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
Without a URL to visit, or an example of a "bad link", it's going to be tough to solve....

;)

 

I can be such a big girl!! :blush: What I'm talking about can be found HERE. The top left box named 'Stores' has the page 'Livingrooms'. When Livingrooms is clicked you get the error.

Posted

OK.

 

The link is formatted correctly.

 

First question:

 

Does this file exist in the root (main) folder of your site:

 

extra_info_pages.php

 

:unsure:

 

The spelling must match exactly!

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
OK.

 

The link is formatted correctly.

 

First question:

 

Does this file exist in the root (main) folder of your site:

 

extra_info_pages.php

 

:unsure:

 

The spelling must match exactly!

 

Nope! It exists in the admin folder and in includes/boxes. There was no file to add to the root folder with this contrib.

Posted

I'm not sure which version you installed, but it won't work without that file in the root folder.

:blush:

 

I suggest checking the install directions again.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Thanks Jim

 

I'll check earlier versions for the file I need.

 

Happy Holidays! :thumbsup:

Posted

If you have problems, just post again, and let me know which version you installed, and I'll try to help.

:)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
I'm not sure which version you installed, but it won't work without that file in the root folder.

:blush:

 

I suggest checking the install directions again.

 

The mystery is solved!! The file was sitting OUTSIDE the catalog folder so I never uploaded it!! I really am a girl!! :lol:

Posted
If you have problems, just post again, and let me know which version you installed, and I'll try to help.

:)

 

Please go back to MY SITE and puff up with pride when you see that I got it working!! :thumbsup:

 

Thanks for your help, Jim. I even added an amended copy of this in the contribs.

Posted

Good job, Monty!

:thumbsup:

 

I really am a girl!!

There's nothing wrong with that!

:rolleyes:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
If you have problems, just post again, and let me know which version you installed, and I'll try to help.

:)

 

Hello again, Jim

 

I'm using v4.6

 

I have a query. Is it possible to make the 'Continue' button at the bottom right take you to the subfolder in question? If so, how do I do this?

Posted

Right now it takes you back to the home page.

 

I'm not grasping where you want it to point to...

:blush:

 

the subfolder in question

Exactly where would that be?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

The idea is that my store will become a virtual mall & the stores will be in subfolders. The extra pages info box will list the store names. When a store (extra page) is selected, the page will provide a brief synopsis about the store & I want the continue button to be the entry point.

 

Did I make any sense?

Posted

I think I get what you want.

 

Instead of pointing to the home page, you want the continue button to point to someplace like this:

 

http://your_site.org.uk/some_folder/some_page

 

That won't be too hard (I don't think).

 

Where will this "some_folder" & "some_page" information come from?

:unsure:

 

Not meaning to sound conceited, but I'm "better than average" when it comes to HTML and PHP, but I don't "do" MYSQL...

:lol:

 

It looks like the script is receiving info via the link:

 

http://your_site.org.uk/extra_info_pages.php?pages_id=4

 

I could probably show you how to make the script do something like this:

 

<?php

switch ( $pages_id ) {
 case '1': //code to setup "continue" button link here
 break;

 case '2': //code to setup "continue" button link here
 break;

 case '3': //code to setup "continue" button link here
 break;
}

?>

 

That means for each page you added, you'd need to modify the script (slightly) to accommodate each new page.

 

Would that be acceptable?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
That means for each page you added, you'd need to modify the script (slightly) to accommodate each new page.

 

Would that be acceptable?

:unsure:

 

YES!!!!! Very, VERY acceptable! :thumbsup: So what do I edit & how? Remember..... I AM a girlie!! :lol:

Posted
Where will this "some_folder" & "some_page" information come from?

:unsure:

 

"some_folder" is an installed osc in a subfolder off the root.

 

"some_page" is an extra info page

Posted

OK.

 

Let me download the files and set it up for you as a "fill in the blanks" type scenario.

 

I haven't looked at the code yet, but off hand I don't think it would take too long.

 

You can go ahead and set up the "some_folder" & "some_page" part on your site so you can test it.

 

Just set up ONE folder, and ONE page to link to for now. Then after we get it working, you can expand.

 

And, if for some reason we can't get it to function, you haven't lost a lot of time setting up things you can't use.

 

I'll download the contribution and get started myself, and post the code when I'm finished.

 

Okie dokie?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Actually, the only code I need would be the extra_info_pages.php that you put in the root folder of your site.

 

Can you please post it between CODE tags?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Sure!

<?php
/*
 $infopageid: extra_info_pages.php, v4.50 2003/06/05 23:26:22 hpdl Exp $

 contribution is : Extra pages-info box w- admin
 http://www.oscommerce.com/community/contributions,2021

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

require('includes/application_top.php');



$infopageid = (int)$HTTP_GET_VARS['pages_id'];



$page_query = tep_db_query("select 
						  p.pages_id, 
						  p.status,
						  s.pages_title, 
						  s.pages_html_text							   
						from 
						  " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id
						where 
						  s.language_id = '" . (int)$languages_id . "'
						and
						  p.pages_id = $infopageid");



$page_check = tep_db_fetch_array($page_query);
$breadcrumb->add($page_check[pages_title], tep_href_link('info_pages.php?pages_id=' . $infopageid));

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo $page_check[pages_title]; ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><?php echo stripslashes("$page_check[pages_html_text]"); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Posted
You can go ahead and set up the "some_folder" & "some_page" part on your site so you can test it.

 

Way ahead of you there..... already done! ;)

Posted

Before beginning, MAKE A BACKUP OF THE FILE AS IT IS NOW.

 

This code here:

 

				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

 

Change to this:

 

				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<?php

$some_folder = '';
$some_page = '';

switch ( $infopageid ) {
 case '4': $some_folder = ''; // put the folder name here like 'livingrooms' <-- ****** EDIT CODE HERE ******
		$some_page = ''; // put the page name here like 'index.html' <-- ***** EDIT CODE HERE ******
		break;

default: break;
}

if ( $some_folder == '' ) {
 $new_page = FILENAME_DEFAULT;
} else {
 $new_page = $some_folder . '/' . $some_page;
?>
			<td align="right"><?php echo '<a href="' . tep_href_link($new_page) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

I've coded it to use the "Livingrooms" link you already have set up.

 

All you need to edit in the code are these two lines:

 

  case '4': $some_folder = ''; // put the folder name here like 'livingrooms'
		$some_page = ''; // put the page name here like 'index.html'

Telling it the folder name, and page name you want to link to.

 

If it works, or rather WHEN it works ( ;) ), I'll show you how to add the code for another page (if you haven't figured it out already).

 

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

 

ADDED IN EDIT:

 

I made one change....

 

This line:

 

  $new_page = $some_folder . '/' . $some_page;

 

Sorry..

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Here's a thought......

 

where are the extra info pages I create stored?

Posted

Well.... in $some_folder/$some_page

 

Maybe I'm not grasping how the whole contribution works....

:lol:

 

How do you create the extra info pages?

:unsure:

 

If they're in your DB, I'm sunk.

 

I thought you created them manually...

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
Well.... in $some_folder/$some_page

 

Maybe I'm not grasping how the whole contribution works....

:lol:

 

How do you create the extra info pages?

:unsure:

 

If they're in your DB, I'm sunk.

 

I thought you created them manually...

 

roflmao

 

I created the extra info pages with this contribution.

 

If the pages are stored in the database, how do I point the above script at the pages?

 

This is becoming a comedy of errors on my part. Thanks soooooooo much for your patience, Jim. I have told you that I'm just a girlie, haven't I? I'm not that hot on the old 'lateral thinking' thing! :lol:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...