Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Is it possible to wrap external pages in Zen Cart

Is it possible to wrap external pages in Zen Cart

Locked

Views: 1,562

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
17 Jan 2007, 3:34 PM
#1
roshlin avatar

roshlin

New Zenner

Join Date:
Jan 2007
Posts:
14
Plugin Contributions:
0

Is it possible to wrap external pages in Zen Cart

Hi friends,:D

How can I open an external page within my zen-cart.
That is is maintining my headers, footer and sideboxes, open and external page in the center..

Sort of wrap the external page. :lamo:

for eg, opening a manufaturers page in my cart.

Thanks for your help and this great script :P

17 Jan 2007, 3:46 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Is it possible to wrap external pages in Zen Cart

There is a manufacturer's URL facility that can be set for each product, but this isn't quite what you want as it sends the visitor to the page rather than wraps it.

Actually wrapping the page would be difficult as the manufacturer's page may contain elements, structure or styling that conflict with or are incompatible with Zen Cart.

The only reasonably robust approach that I can think of would be to insert a frame into your Zen Cart and serve the manufacturers' pages, but it's going to look a bit old fashioned and tacky.

17 Jan 2007, 9:01 PM
#3
roshlin avatar

roshlin

New Zenner

Join Date:
Jan 2007
Posts:
14
Plugin Contributions:
0

Re: Is it possible to wrap external pages in Zen Cart

Hi Kuroi,

Thanks for your quick response.

Opening the manufactures page in the center in a frame is OK with me till some thing else comes up.

I use postwrap and nuke wrap in postnuke, and on this new site I will only be installing Zen Cart so if you could suggest how I could serve the pages in a frame, or atleast below my header to start with, I would be greatly obliged. :yes:

Thanks

19 Jan 2007, 1:10 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Is it possible to wrap external pages in Zen Cart

Sorry. I've only ever once used frames on a site and that must have been 5 or 6 years ago before people fully appreciated their impacts on search engines and accessibility. I wouldn't know where to begin now giving advice in this area.

19 Jan 2007, 1:20 AM
#5
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Is it possible to wrap external pages in Zen Cart

you may want to findout if the manufacturer cares that you are displaying their content ( and using their bandwidth ). Zen Cart is not designed to work inside a frame,

19 Jan 2007, 6:03 AM
#6
inksale avatar

inksale

Zen Follower

Join Date:
Jan 2005
Location:
Gold Country CA
Posts:
265
Plugin Contributions:
0

Re: Is it possible to wrap external pages in Zen Cart

I played around with this using I-Frames and EZ Pages
Not exactly the same as what your looking for but it may help.
http://www.zen-cart.com/forum/showthread.php?t=44524

20 Jan 2007, 9:22 PM
#7
roshlin avatar

roshlin

New Zenner

Join Date:
Jan 2007
Posts:
14
Plugin Contributions:
0

Re: Is it possible to wrap external pages in Zen Cart

Hi Merlinpa1969,

The manufacturer will be thrilled as someone else is taking pain in showcasing thier site :D after all it for displaying thier products.

Thanks inksale, :cool:

it works fine, could I optionally take out the right boxes for some pages that dont fit in?????????

9 Mar 2007, 7:34 AM
#8
moonsand avatar

moonsand

New Zenner

Join Date:
Mar 2007
Posts:
1
Plugin Contributions:
0

Re: Is it possible to wrap external pages in Zen Cart

Here's something that I did and it worked fine if you know some PHP:

find line 56 in tpl_page_default.php:

<div><?php echo $var_pageDetails->fields['pages_html_text']; ?></div>
```and change to:

```php
    <div><?php echo eval("?>".$var_pageDetails->fields['pages_html_text']); ?></div>
```Basically what this does is that it "evaluates" any PHP code you put in the Ez-Pages "HTML Content" section. After that you could use some creative PHP to read an external site and strip the headers...etc. OR make your own pages and use an "include" statement like I did. I used the following in the HTML Content to show an external page I used for another section:

```php
<?php include('/home/public_html/shop/pages/product_info.php'); ?>
```NOTE: It seems that you can't use PHP code when using the "HTMLarea" editor. You need to switch it to "Plain Text" before using PHP.

I don't know if this 100% safe, but it seems to work for me. You can take this a bit further (and make it nice and neat) by making a new function file (in >  /includes/functions/extra_functions/) and put this code in it:

```php
 function parse_php($text_to_parse) {

return eval("?>".$text_to_parse);

}
```and change some "echo" statements in template files to something like:
```php
echo parse_php($string)
```Hope this helps...and please, feel free to correct me if this is unsafe or not working right... thanks.

P.S. In case you're wondering why we need the "?>", it's because the "eval" statement starts in PHP mode so by giving it a PHP terminator it starts off in HTML mode.