Jump to content

Recommended Posts

I am not sure how to do this and would like some help on what would be the best way to accomplish this. Anyways my problem is that I have my site that works great and what not that runs off of a .css.  I also have a shopping cart system that pretty much has its own interface.

 

My questions is how would I include the shopping cart page/site within my current site. I just want my users to have the same look and feel with the shopping cart layed out the same way. I have tried messing with the shopping carts .css and its starting to look funny. BTW i am using a ZEN cart.

 

Can I use something like: index.php is the shopping carts

<?php
include "/cart/index.php";
?>

 

any help would be awesome.

Link to comment
https://forums.phpfreaks.com/topic/88780-including-another-page/
Share on other sites

I tried what you said and i get a bunch of the following

 

Warning: main() [function.main]: URL file-access is disabled in the server configuration in /home/.heavengaze/contentlit/new.mydomain.org/newsite/cart.php on line 34

 

line 34 is the include line.

 

 

Post the actual include line you are using.  Sounds like you are going to a outside link?

 

I tried what you said and i get a bunch of the following

 

Warning: main() [function.main]: URL file-access is disabled in the server configuration in /home/.heavengaze/contentlit/new.mydomain.org/newsite/cart.php on line 34

 

line 34 is the include line.

 

 

I guess it would be an outside link, because it is another system. I have my header and sidebar that is on my other pages, I just want shopping cart system to have the sidebar and header just like all of the other pages. I thought there was a way to do this but I cant seem to figure it out.

 

The only other was I was trying to do it was to edit the css on the shopping cart site but it is a huge pain. Thanks.

 

<h1 class="title">Welcome to the Online Store </h1>
	    <div class="entry">
		  <p>
		  <?php
		  		include "http://www.mydomain.org/cart/index.php";
		  ?>

No modern servers would allow you to include a file from another domain. That is a major security risk. You need all the files stored on your own server if you want to use PHP include. However, you could look at iFrames, a very messy solution.

I have tried this and it doesnt load anything

 

<?php
include "../cart/index.php";
?>

 

When doing this I get a bunch of errors that show up on my page that, they are.

  <?php
		  		include "http://www.mydomain.org/cart/index.php";
		  ?>

 

 

Warning: main() [function.main]: URL file-access is disabled in the server configuration in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34

 

Warning: main(http://www.mydomain.org/cart/index.php) [function.main]: failed to open stream: no suitable wrapper could be found in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34

 

Warning: main() [function.main]: URL file-access is disabled in the server configuration in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34

 

Warning: main(http://www.mydomain.org/cart/index.php) [function.main]: failed to open stream: no suitable wrapper could be found in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34

 

Warning: main() [function.include]: Failed opening 'http://www.mydomain.org/cart/index.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34

Mydomain.org

  -Cart (folder)along with other folders and files for the shopping cart

    -index.php

  -Site (folder)this is where all of my current pages are

    -index.php,

    -aboutus.php

    -contactus.php

      and so on.

 

Is this what you need?

I made sure that everything is case sensitive so that i know is fine but I tried what you said and now im getting the page not to load properly. It seems to only load a portion of the page because an image that is set in the css is not loading now. I can see my background and some text above where the include code is but nothing to do with the shopping cart.

 

 

 

Any other ideas?

 

Basically I have a Zen-Cart system installed in a folder called cart. I have my website in a folder called site. I want to be able to have the sidebar, header and footer around the shopping cart system on my site.

 

Would I need to do an include function on the index.php of the shopping cart site? I have tried doing an include on the index.php on the cart system but i just get errors.

 

Any ideas on how I can accomplish getting the shopping cart system within my normal site so users have the look and feel of the normal site but the shopping cart within it?

 

Thanks.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.