Forums / Templates, Stylesheets, Page Layout / Running Zen-Cart in a <div>

Running Zen-Cart in a <div>

Locked

Started by kontron on 17 Feb 2009, 10:00 PM · Views: 804

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
17 Feb 2009, 10:00 PM
#1
kontron avatar

kontron

New Zenner

Join Date:
Feb 2009
Posts:
4
Plugin Contributions:
0

Running Zen-Cart in a <div>

Hi, I tried to load the zen cart homepage into a <div> from another page using simple javascript. However the zen-cart page shows up as pure html. I suppose this is due to some path problems. This is my current path set-up

mainpage: http://server/somepage/index.php
zen-cart: http://server/somepage/zen-cart/index.php

There is a javascript called getContent() that populates a given <div> with a particular URL. The call to getContent() looks like this,

</script>getContent('someDiv', 'zen-cart/index.php');</script>

I have already pointed all paths in includes/configure.php and admin/includes/configure.php to "//server/somepage/zen-cart/"

Can anyone suggest a way to make the zen-cart page show correctly?

17 Feb 2009, 10:11 PM
#2
kontron avatar

kontron

New Zenner

Join Date:
Feb 2009
Posts:
4
Plugin Contributions:
0

Re: Running Zen-Cart in a <div>

okie i got it to work with an iframe instead of div. However it will still be nice to work with a div, iframe seems kind of slow.

17 Feb 2009, 10:14 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Running Zen-Cart in a <div>

Running Zen Cart inside an iFrame is highly discouraged, as it can lead to various problems. Someone posted a day or two ago with one of these, trying to get forms to work properly inside the iFrame.

What are you trying to do that you can't run Zen Cart straight on its own page? You can style the header and other template elements to match other parts of a site.

17 Feb 2009, 10:28 PM
#4
kontron avatar

kontron

New Zenner

Join Date:
Feb 2009
Posts:
4
Plugin Contributions:
0

Re: Running Zen-Cart in a <div>

I can potentially customize the zen-cart page to match however I already have a working website and i just want to integrate a "web store" page, so I thought this might be a quick a dirty way to do things. However if Iframe poses a problem then I will have to find another solution.

17 Feb 2009, 10:29 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Running Zen-Cart in a <div>

Can you post a link to see your current site? We can tell you how likely it is to be easy to match your other pages with Zen Cart. That really is the best option in most circumstances.

17 Feb 2009, 10:53 PM
#6
kontron avatar

kontron

New Zenner

Join Date:
Feb 2009
Posts:
4
Plugin Contributions:
0

Re: Running Zen-Cart in a <div>

I am still developing the web site locally so its not public addressable yet. However I will test out the iframe method for the time being as all the forms seems to working up to this point. I'll keep this thread updated if i find anything wrong with using iframes.