Zen Cart Logo
Forums / General Questions / How the Zen Cart MVC works?

How the Zen Cart MVC works?

Locked

Views: 4,739

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
26 Mar 2010, 9:25 AM
#1
ashmangy avatar

ashmangy

New Zenner

Join Date:
Mar 2010
Posts:
6
Plugin Contributions:
0

How the Zen Cart MVC works?

Hi, I am new to Zen Cart and need to fix some issues. Please can anyone guide me as how can I understand / debug the Zen Cart, how can I identify the page / function that is being executed?

In my site all links are executed through index.php so I fail to understand which page/function contains the actual functionality. e.g. My site calls the following:

http://xyz.com/index.php?main_page=page&id=4&frm=something

where should I look for if I want to modify the functionality in the page I get?

Thanks, appreciate your help.

Regards.

26 Mar 2010, 9:36 AM
#2
ashmangy avatar

ashmangy

New Zenner

Join Date:
Mar 2010
Posts:
6
Plugin Contributions:
0

Re: How the Zen Cart MVC works?

Hi, I am new to Zen Cart and need to fix some issues. Please can anyone guide me as how can I understand / debug the Zen Cart, how can I identify the page / function that is being executed?

In my site all links are executed through index.php so I fail to understand which page/function contains the actual functionality. e.g. My site calls the following:

http://xyz.com/index.php?main_page=page&id=4&frm=something

where should I look for if I want to modify the functionality in the page I get?

Thanks, appreciate your help.

Regards.

26 Mar 2010, 9:43 AM
#3
ashmangy avatar

ashmangy

New Zenner

Join Date:
Mar 2010
Posts:
6
Plugin Contributions:
0

Re: How the Zen Cart MVC works?

Hi, I am new to Zen Cart and need to fix some issues. Please can anyone guide me as how can I understand / debug the Zen Cart, how can I identify the page / function that is being executed?

In my site all links are executed through index.php so I fail to understand which page/function contains the actual functionality. e.g. My site calls the following:

http://xyz.com/index.php?main_page=page&id=4&frm=something

where should I look for if I want to modify the functionality in the page I get?

Thanks, appreciate your help.

Regards.

26 Mar 2010, 9:52 AM
#4
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: How the Zen Cart MVC works?

Is there supposed to be a Zen-Cart at that URL? You can find out about debugging Zen-Cart HERE, but you first have to have ZC installed before you can debug it, and if that's the correct URL in your post, then you have no ZC installed.

26 Mar 2010, 10:08 AM
#5
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: How the Zen Cart MVC works?

Oh, yea..........a little hint about this forum............posting the same question 3 times will do nothing but make the Mods mad, and most of the time get you ignored by others.

26 Mar 2010, 10:11 AM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How the Zen Cart MVC works?

As dynamic PHP software, Zencart builds almost all its pages 'on the fly', pulling in information from several sources, including define files, modules, template files, and the database. The names of the various files can give you a clue as to what those files apply to.

If you have a question about a particular function, we might be able to provide an example.

26 Mar 2010, 10:28 AM
#7
ashmangy avatar

ashmangy

New Zenner

Join Date:
Mar 2010
Posts:
6
Plugin Contributions:
0

Re: How the Zen Cart MVC works?

Hi, I am new to Zen Cart and need to fix some issues. Please can anyone guide me as how can I understand / debug the Zen Cart, how can I identify the page / function that is being executed?

In my site all links are executed through index.php so I fail to understand which page/function contains the actual functionality. e.g. My site calls the following:

http://xyz.com/index.php?main_page=page&id=4&frm=something

where should I look for if I want to modify the functionality in the page I get?

Thanks, appreciate your help.

Regards.

26 Mar 2010, 10:36 AM
#8
ashmangy avatar

ashmangy

New Zenner

Join Date:
Mar 2010
Posts:
6
Plugin Contributions:
0

Re: How the Zen Cart MVC works?

Thanks friends for taking out time and replying.

Sorry for multiple post, that was not intentionally. Actually to check for replies I accidentally refreshed the 'post new thread' page.

The index.php has following comments so I think it is part of zen cart:

  • index.php represents the hub of the Zen Cart MVC system
  • Overview of flow
  • <ul>
  • <li>Load application_top.php - see {@tutorial initsystem}</li>
  • <li>Set main language directory based on $_SESSION['language']</li>
  • <li>Load all *header_php.php files from includes/modules/pages/PAGE_NAME/</li>
  • <li>Load html_header.php (this is a common template file)</li>
  • <li>Load main_template_vars.php (this is a common template file)</li>
  • <li>Load on_load scripts (page based and site wide)</li>
  • <li>Load tpl_main_page.php (this is a common template file)</li>
  • <li>Load application_bottom.php</li>
  • </ul>
  • @package general
  • @copyright Copyright 2003-2005 Zen Cart Development Team
  • @copyright Portions Copyright 2003 osCommerce
  • @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  • @version $Id: index.php 2942 2006-02-02 04:41:23Z drbyte $

Regards.

26 Mar 2010, 10:57 AM
#9
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: How the Zen Cart MVC works?

Yes, that is "index.php" of ZC, but did you actually INSTALL ZC after you uploaded the files to your server?

You should get the install page first thing after uploading. So you would go to:

http://your_domain_name.com

or:

http://your_domain_name.com/install/install.php

If you're seeing (able to read it in your browser as text) the rest of that file you posted, then it would appear that you have Indexing turned on, and I would suggest (again) that you go into your cPanel and set "Indexing" to OFF for your public_html directory. Once done, you should see the Install page, instead of it being "indexed".

READ THIS!

26 Mar 2010, 11:05 AM
#10
ashmangy avatar

ashmangy

New Zenner

Join Date:
Mar 2010
Posts:
6
Plugin Contributions:
0

Re: How the Zen Cart MVC works?

It is a working site amd the ZC has been installed by the site owner.

26 Mar 2010, 11:25 AM
#11
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: How the Zen Cart MVC works?

Do you have a URL for us to look at this problematic site?

26 Mar 2010, 12:33 PM
#12
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How the Zen Cart MVC works?

I haven't yet figured out what you're saying the problem is.

26 Mar 2010, 12:35 PM
#13
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: How the Zen Cart MVC works?

stevesh:

I haven't yet figured out what you're saying the problem is.

Ditto......