Forums / General Questions / Does Zen Cart have to run my entire site?

Does Zen Cart have to run my entire site?

Locked

Started by doodlebee on 12 Apr 2007, 12:41 PM · Views: 5,055

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
12 Apr 2007, 12:41 PM
#1
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

Does Zen Cart have to run my entire site?

I have a quick general question, if I could.

The first time I used ZenCart was a year ago. I was subbed by another design house to install it - never had done it before so it was sort of "trial by fire" if you know what I mean :)

What we did was create the woman's site with static pages. Then we created the ZenCart foe her store, and linked to the store from her regular site's navigation. This was before we had any inkling that ZenCart could handle the whole site - we just thought it was a shopping cart. Like I said - trial by fire!

Anyway, we've had reports from this original installation that if you're shopping on the site, and you navigate out of the cart to the static site (for whatever reason) and then return to the shopping cart, all the contents of the cart are gone. I've "heard through the grapevine" (never validated this) that the reason is because ZenCart sets cookies on your visit, and if you navigate outside the cart itself - even if it's on the same base URL - you lose the cookie, and thus the cart contents. Therefore, when you build a site that will use ZenCart, you must allow ZenCart to handle the entire site, or this will happen.

I was wanting to know if this was true? Since this "revelation", we've been doing ZenCart installations all based on this premise, and allow ZenCart to handle everything. But now I've been asked to do a ZenCart installation on an already existing site that's running it's own custom PHP/database system. To take all of the pages from that very-established site would cause some real issues.

It seems to me that someone might be misinformed about the need for ZenCart to handle all pages if you plan to use it. I mean, if someone has an established site that's already set and running fine the way it is, and one day they decide to start selling something using ZenCart - it doesn't seem too far-fetched to want to just add ZenCart in with a link in the already existing site, and not have to worry about people losing items if they move away from the cart.

So am I right in my line of thinking? And if so, what needs to be done so that the weird "losing the content of the cart" issue doesn't happen? Should I have the programmer do something with the cookies so they aren't lost when going away? I dunno what I'm asking LOL - I just want verification that it's not true, and ZenCart can easily be an add-on. And that the previous issues people had are a couple of people who just have their browsers set to not accept cookies (I don't know how many people have said this - this is all third-hand rumor stuff, really.)

I'd like to be able to tell this new client that we don't have to overhaul the entire site (and it's a BIG site!) and all of the custom database work they've got going just to use ZenCart to sell a few things. I'd like to tell him that all we have to do is install ZenCart and then do something with the cookies (or whatever) and they'll be set. Please tell me I can! :)

12 Apr 2007, 12:55 PM
#2
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Off the top of my head, I believe there's a setting in the admin which allows the cart to be "remembered" or cleared. I'm sure someone else with the definitive answer will be along shortly. :wink2:

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

12 Apr 2007, 1:00 PM
#3
merlinpa1969 avatar

merlinpa1969

Totally Zenned

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

Re: Does Zen Cart have to run my entire site?

Zen Cart uses a session ID,
what happens is this session ID gets dropped when someone navigates out of the shop

Yes you can bolt Zen Cart on as a store but you want to make sure that once in the store they stay in the store until they are done shopping,
or have created an account,

Zen cart PCI compliant Hosting

12 Apr 2007, 1:17 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

I wonder if they'd be able to keep the session id going, since the rest of their site is also operating on PHP? Obviously need some custom programming, but I can't see why it wouldn't work -- as long as the site visitor stays within the domain of course.

Breakfast: the most important donut of the day.

12 Apr 2007, 2:12 PM
#5
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Okay, so it's true, then - if they navigate away, they lose the cookie and therefore the cart. (I understand about logging in, but many people - like me! - will shop before creating an account, so I would be one of those poeple to lose the cart contents - which would p*** me off!)

Stevenson - this is what they were thinking. The custom PHP system is almost completely finished. They were also wondering if it were possib;e to program something to keep the ZenCart session ID (cookie) even if they navigate away. If you all think that is a viable option, then I think that they could certainly handle the programming to make it work. I'd just hate to get them started on it, only to find out it won't because of something ZenCart has set.

(and I didn't forget you, afo! I'll check into that suggestion too :) )

Thanks all :)

4 May 2007, 2:20 PM
#6
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Okay, I'm bringing this up again.

I have the WordPress contribution to ZenCart installted for a site I'm working on. But I'm running into a LOT of problems (I can't seem to get help for them), and I think I just need to separate the two. This is where this thread comes in: if I create a regular wordpress installation - not as a contribution to ZenCart, but as a standalone (typical) installation, will the end user lose the cookie if they go from zencart to wordpress and back? It'll be on the same domain, side-by-side installations.

If I place the wordpress installation inside the zencart folder (but not as a contribtuon), would that help to retain the cookie?

If not, woudl anyone know how I can retain the cookie? Would setting Sessions>Force Cookie Use to "true" help with this?

And since I'm here, is it possible to somehow use the ZenCart header file with my wordpress theme files? I know you can do this with Wordpress - it's just a matter of adding the wp-blog-header.php include to the top of any other file (like a static PHP page outside of WordPress), and you can use WordPress tags throughout to your heart's content. So I was wondering if there's a similar method using ZenCart - all I need is the ZenCart header to replace the WordPress header.

Any help would be appreciated.

4 May 2007, 2:43 PM
#7
merlinpa1969 avatar

merlinpa1969

Totally Zenned

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

Re: Does Zen Cart have to run my entire site?

Yes they will lose the cookie

Zen cart PCI compliant Hosting

4 May 2007, 2:59 PM
#8
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Thanks Merlin.

It's odd, though...I just tried it out myself. I didn't lose the cookie. I added stuff to the cart without logging in, then I moved to my own wordpress site (currently under the same domain name as the cart I'm working on - but outside the ZanCart installation). I went back to the cart, and my cart was still there - I lost nothing.

I did it again, this time moving from my zencart to a site somewhere else - totally different domain, and when I returned to the cart, my items were still there.

However, after around 20 minutes of waiting - whether I was in the ZenCart or not - when I came back, my stuff was gone.

So I think the previous issue is not the cookie passing through, but the length of time ZenCart holds onto it...

11 Jun 2007, 2:24 PM
#9
csamson777 avatar

csamson777

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

I'm trying to provide the same functionality in order to avoid cart's content to be lost when the user leaves zencart for another site in a different domain and comes back again then.

Please give me a hint on what needs to be done in order to support that requirement.

11 Jun 2007, 2:28 PM
#10
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Like I said above - it's not the cookie that's lost, it's the time that's set for the cookie. I've had no problem starting a cart and navigating from site to site - as long as I return to the cart in that 24-minute window, my stuff is still there whether I'm logged in or not. If I come back after the 24-minute window has passed, everything is gone.

You can set the session for longer amount of time, but I really wouldn't do that.

12 Jun 2007, 1:33 PM
#11
csamson777 avatar

csamson777

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Thanks for your answer. We are required to run the cart in iframe from an existing site. Since parent site is in a different domain than cart site (embeded iframe), looks like the browser can't create the cart session cookie. That is why i was loosing my stuff.

I solved the issue by punching the user out to an invisible page in cart's domain which creates the session cookie and then re-direct the user to the client site embedding the cart iframe. The browser has the ability to read the cookie and work with the session then...

ugly solution, but it works

19 Dec 2007, 12:31 AM
#12
tipgypsy avatar

tipgypsy

New Zenner

Join Date:
Dec 2007
Posts:
9
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

doodlebee:

Like I said above - it's not the cookie that's lost, it's the time that's set for the cookie. I've had no problem starting a cart and navigating from site to site - as long as I return to the cart in that 24-minute window, my stuff is still there whether I'm logged in or not. If I come back after the 24-minute window has passed, everything is gone.

You can set the session for longer amount of time, but I really wouldn't do that.

Where do you set the timeout for the cookie - Is this still valid for the current version of Zen ?
Thanks much

19 Dec 2007, 2:05 AM
#13
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,718
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

tipsy -Please don't post in a thread and then start your own new thread for the same issue.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

19 Dec 2007, 2:50 AM
#14
tipgypsy avatar

tipgypsy

New Zenner

Join Date:
Dec 2007
Posts:
9
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Sorry,
My bad, Hopfully it can be deleted by the Mod's

20 Mar 2008, 6:16 PM
#15
jmbrbr avatar

jmbrbr

New Zenner

Join Date:
Dec 2007
Posts:
13
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Wouldn't navigation to all off pages through an EZ pages redirect solve that without any question? Easy enough to link through an EZ page and they ARE unlimited. :o)

<?php?><?SQL?>

I've been zenned
backyardfunsite.com/playgroundequipmentsupply.us

24 Apr 2008, 6:40 PM
#16
seltron avatar

seltron

New Zenner

Join Date:
Nov 2007
Posts:
11
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

I just want to recap on with what I know.

The server creates the SessionID and holds the Session (cart) information.

Then stores a cookie on the browser that references the SessionID.

The session is held for X amount of time after the last time the session was accessed (i.e. any php page on the site). There is several different places to set the X time, but this is where you are seeing the '24 minutes'.

Right now the cookie is store indefinitely on the user's browser, UNTIL the browser is closed. This is from the settings that I see.

So in other words, the user can browse anywhere, even off-site.
As long as the user doesn't browse away from the site for more than the Session Timeout OR close the browser window; the cart should be safe.


I will state that with php code, they code can change the SessionID, although this isn't really likely and usually for special purposes only.

3 Apr 2010, 7:32 AM
#17
achachet avatar

achachet

New Zenner

Join Date:
Jul 2009
Posts:
2
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

I don't know if this post is still live, but here's an elegant solution to keep session information when browsing away from ZC.

This solution assumes your static site is hosted in the same dir as ZC.

In any static page just include:

<?php require 'includes/application_top.php'; ?>

This will load the main ZC environment and restore the $_SESSION variable.

You can then return to your cart with no timeout issue.

Cheers

3 Apr 2010, 8:38 AM
#18
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Does Zen Cart have to run my entire site?

achachet:

...This solution assumes your static site is hosted in the same dir as ZC.

In any static page just include:

<?php require 'includes/application_top.php'; ?>

This will load the main ZC environment and restore the $_SESSION variable. ....

Technically this should work fine. However, in most cases the static pages do not reside in the same dir as ZC. In other words, if the static pages reside in the top level of the server and ZC in a sub dir then simply no go...:no:

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

3 Apr 2010, 11:49 AM
#19
loosefast avatar

loosefast

Zen Follower

Join Date:
Jun 2005
Posts:
199
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

Would it work if you used absolute link?

<?php require 'http://www.zen-cart.com/includes/application_top.php'; ?>
3 Apr 2010, 6:09 PM
#20
ezorb avatar

ezorb

Zen Follower

Join Date:
Apr 2006
Location:
Midland TX
Posts:
426
Plugin Contributions:
0

Re: Does Zen Cart have to run my entire site?

I have built my website using NOF-11 and linked to Zencart for the shopping. I have not found this to be a real issue. If it is a new customer they are leaving for some reason and could leave on either design. If it is a Returning customer and they place products in cart then they should be there even if they return next week. To me no big deal, I find it easier or what I am custom to have them split.

Larry