Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to Display Specials on a non-OSC page


kappaluppa

Recommended Posts

Posted

I want to take the info from the specials.php page and put it on another page that is outside the OSC directory - displayed at the top of my index page.

 

I have made a copy of the page and called it specials2.php. )

 

But when I use the <? include "./catalog/specials2.php" ?> in the index page, I get this error:

Fatal error: Failed opening required 'includes/configure.php' (include_path='.:/usr/share/pear')

 

The problem: I cannot for the life of me I cannot get it to point to includes/configure.php to make it work! :cry: :cry:

 

ANY IDEAS????? THANKS!!! k

Posted

Use a frame with the full URL?

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

I'm not sure if that last comment was a question or a suggestion. :)

Either way, it did not work.

 

BUT...

I ALMOST have it working!

 

This is how i did it incase anyone is trying to pull data out of the shopping cart into another part of their website...

 

After making a copy of specials.php to specials2.php, I stripped out everything except for the table that has the specials, and the require of application_top.php.

 

I also made a copy of application_top.php to application_top-2.php and modified it, so that I would not ruin the file i needed to run the rest of the shopping cart.

 

I had to use the complete path to the 'requires', since specials-2.php, and subsequently application_top-2.php, was being used outside the catalog directory.

 

There are several other files that I had to make a copy of so that I could modify - /languages/english.php and /functions/sessions.php ( maybe others, i can't remember :) )

 

I left all these duplicate files in their same folders.

 

---------

 

:!: I now have the list of specials showing up on my index page. BUT!!! I have an error too... boo hoo! Here it is at http://www.kappaluppa.com/freeman/index.php:

 

Warning: Cannot send session cookie - headers already sent by (output started at /var/www/usera/kappaluppa/kappaluppa.com/www/freeman/index.php:7) in /var/www/usera/kappaluppa/kappaluppa.com/www/freeman/catalog/includes/functions/sessions-2.php on line 67

 

Warning: Cannot send session cache limiter - headers already sent (output started at /var/www/usera/kappaluppa/kappaluppa.com/www/freeman/index.php:7) in /var/www/usera/kappaluppa/kappaluppa.com/www/freeman/catalog/includes/functions/sessions-2.php on line 67

 

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

 

I am not a good at php, so I'm not quite sure how all that is mentioned in the error works together.

 

I sort of feel like a doctor who might learn how to operate by just going in there and start taking things out and see what happens! That's how I got this far. :D

Posted

It was a suggestion, but a tentative one given that (a) some people have an aversion to using frames, and (B) I haven't tried it myself but I thought it might avoid having to do exactly what you have had to do.

Anyway, your errors are most likely being produced because of an extra space character in your index.php file. Check that nothing follows the terminating ?> in index.php.

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

I took out white spaces all over the place and could not get rid of the errors. :cry:

 

What I ended up having to do was comment out a few lines about sessions and make them true, on the copy of the sessions.php page i made (sessions-2.php).:

# return session_start();

return true;

 

That got rid of the errors.

 

http://www.kappaluppa.com/freeman/index.php

 

hooray!

 

----------

 

I'm on to a new adventure...

 

Now that I can pull the info out of the catalog and display it somewhere else. I want the information to be random. I'm running into problems with my tables being screwy. This is more a php/programming/ignorance problem, than an OSC problem, so I won't run the thread here.

 

But thanks for the help! If anyone attempts this same thing and runs into problems, please feel free to email me and I'll do what I can to help.

 

Kathy

Archived

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

×
×
  • Create New...