thedjmixman Posted July 18, 2003 Posted July 18, 2003 Am I able to call up the "What's new" and "Shopping Cart # Items" windows on my main site (which runs alongside my shopping cart)? Thanks In Advance :), Chris
equilla Posted July 18, 2003 Posted July 18, 2003 Hi, yes this is definitely possible and I did this myself on one of my old websites. What I did was to use and <IFRAME> tag to include the relevant file within the page. For instance: <IFRAME src="catalog/includes/boxes/whatsnew.php"> In my case I ended up creating a whole new php file for the box as I wanted it to have different heading text "New from our Store" or something similar, but I don't think there was any more technical reason that I did this. Hope this helps, Mark Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422
thedjmixman Posted July 18, 2003 Author Posted July 18, 2003 Mark, you are brilliant! Thank you very much. I will go and give it a try now!! :) Thanks :D :D Chris
thedjmixman Posted July 18, 2003 Author Posted July 18, 2003 Hello again ;) I am getting the following message where I want the "what's new" window to appear.. "403 - Forbidden Our web server could not process the request submitted due to the fact that you have attempted to enter a forbidden area of our site. " Do you know how to sort this out? Cheers, Chris
equilla Posted July 18, 2003 Posted July 18, 2003 Interesting.... Are you sure the URL is right? Normally you see this message when the browser tries to open a directory for viewing (and this has been disallowed in the webserver config) or if the webserver tries to open a page from somewhere outside the proper place (like the root of the server for instance!). If you want me to take a look then post a url here or e-mail it to me. Bear in mind that I'm at work at the moment, so it might take a while to get to it! :) Mark Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422
thedjmixman Posted July 18, 2003 Author Posted July 18, 2003 Cheers Mark, When I posted last, I had been trying to view it in preview mode before uploading the page. I then thought that the request may need to come from the within the site, so I uploaded the page and tried again. I still got the error message though. Every now and again when writing my url, i forget to type .html, which brings up a list of everything in that particular directory. So I guess that has not been disallowed. I will PM the link to you. Cheers
thedjmixman Posted July 18, 2003 Author Posted July 18, 2003 Solved one problem :) There was a file in the 'includes' directory which banned people from any of the files. Got that sorted now, but I now get this message... Fatal error: Call to undefined function: tep_random_select() in /home/happynat/public_html/shopping/includes/boxes/whats_new.php on line 17 Would I be able to make a file which starts with definitions that I need, followed by the contents of 'whats_new.php'? Or is there an easier way of fixing this? Many Thanks, Chris
Aric Posted July 19, 2003 Posted July 19, 2003 files are usually dependent on other files for functions etc... So I'm guessing you are including a file or using a function outside of the OSC defined structure.. in which case you have to find all the dependencies, and their dependencies etc.. until you have it all contained :)
blueline Posted July 19, 2003 Posted July 19, 2003 Make sure that you are requiring application_top.php. Otherwise it will definitely not work. Chris Sullivan
j007w Posted July 19, 2003 Posted July 19, 2003 I agree with blueline. If you're using MS2 then include filenames.php as well. Joseph
equilla Posted July 19, 2003 Posted July 19, 2003 Oops, of course they are right - that'll teach me to answer questions when I don't have any of my files to hand to check the detail of things I did months ago!. :oops: What I actually did when I created this before was to copy default.php and cut out all the stuff I didn't need and call it whats_new_homepage.php. This is then included in the IFRAME. My whats_new_homepage file looked something like this (although there is more that could be trimmed out): <?php require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!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"> <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"> <?php require(DIR_WS_BOXES . 'homepage_whats_new.php'); ?> </table> includes/boxes/homepage_whats_new.php is a copy of whatsnew.php, but altered so that when the image is clicked it opens in a new page, rather than in the IFRAME. By way of an example, I have it on the bottom left hand column here: http://%20*EDIT*%20 Cheers, Mark *EDIT* - do not post commercial URL's to these forums - Johnson Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422
thedjmixman Posted July 20, 2003 Author Posted July 20, 2003 Thank you all for your responses :) I will get on the case and see what I can do. Sorry I didnt reply sooner. I had my computer at my daughters house and their phone line got cut off hehehhee. Thank you all!! Chris
secure Posted July 29, 2003 Posted July 29, 2003 How did you fix the problem of opening it in new window? I just want it to open in self page rather than iframe or a new window? and the other problem is that when you call a php on a iframe it does not use 0 margins and a transparent background... I got tired of doing that site :(
Recommended Posts
Archived
This topic is now archived and is closed to further replies.