basics

Locked

Views: 6,182

Results 41 to 49 of 49
This thread is locked. New replies are disabled.
22 Feb 2007, 3:49 AM
#41
jagguy avatar

jagguy

New Zenner

Join Date:
Feb 2007
Posts:
64
Plugin Contributions:
0

basics

Hi,
I am quite happy with ZC with the way you can link in and out of an ecommerce section, this makes integrating websites dead simple and flexible. That was my main concern but has been solved yesterday.

To do it this php in a ZC requires files I am confused about.
If I create a file called myone.php then i create a folder called MYONE.

then you need to create 3 pages and 1 folder

folder
includes/modules/pages/YOUR PAGE NAME
file
includes/modules/pages/YOUR PAGE NAME/header.php
includes/languages/YOUR LANGUAGE/page_name.php
includes/templates/YOUR TEMPLATE/tpl_your pagename_default.php
includes/extra_datafiles/yourpage_filenames.php

what is header.php, page_name.php,tpl_your and pagename_default.php,yourpage_filenames.php ?

That is 4 files ontop of my own file I want displayed. So are these files just found elsewhere and you copy and paste or I need to create?

What goes in these files exactly and how can I call it from ZC ( what file do I call)?

thanks

22 Feb 2007, 3:55 AM
#42
merlinpa1969 avatar

merlinpa1969

Totally Zenned

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

Re: basics

use the page2 files for examples

you will see ALL that you need to see,
then you can use ezpages to call these internal pages and drop the links in the header, the footer, or a sidebox

so rather than Jumping on these folks,
take a minute to hear what they have to say,

you might want to Unblock those that you were rude to,

say a few oopses and forgive me's

take the @$$ kickin that you will recieve from a few of them then let them and others help you to your end,

Please not I looked at your site and there is nothing there that cant be done in ZC in a matter of Hrs,

and you may want to talk to the designers,
its full of errors

Zen cart PCI compliant Hosting

22 Feb 2007, 3:56 AM
#43
tinas avatar

tinas

Totally Zenned

Join Date:
Jan 2005
Location:
Lake Havasu, AZ
Posts:
1,090
Plugin Contributions:
0

Re: basics

Jagguy - download the "About Us" page that I linked to and you will see how it all goes together :)

When the world gets in my face I say Have A Nice Day.

22 Feb 2007, 7:05 AM
#44
jagguy avatar

jagguy

New Zenner

Join Date:
Feb 2007
Posts:
64
Plugin Contributions:
0

Re: basics

Hi,

I am not getting what to do here I am sorry. ZC is confusing for me as I don't have much experience on it.

page2 is that page_2.php in english/language dir? and is this linked to the tpl file of the same name tpl_page_2_default.php. I construct pages like this and add php content on a ezpage , then link to it is that what you are talking about?

Maybe a hello world example is all I need but it looks like I need it. Does the ezpage just contain the php information or is it used some other way.
If I just want to say hello world from a php script what files do I need exactly to make it work?

Where is the aboutUs page located as I couldn't really find it anywhere , not really lucky with this thing yet.

ps ok I can get it in page_2 but how do I link that in the system and can i get DB info?

thanks

22 Feb 2007, 7:16 AM
#45
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: basics

TinaS:

All you need to do - very SIMPLE - click DOWNLOAD above - and then oh heck - here this is the URL to where I was sending you :
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=182

This is the "basic structure" of creating a new page in zen. I have used it over and over and I have embedded TONS of other PHP scripts into my zens

TinaS:

Jagguy - download the "About Us" page that I linked to and you will see how it all goes together :)

I think the link above is what TinaS was referring to.

While the about-us contribution doesn't pull data from the database, it does demonstrate the infrastructure used for a new "page" in Zen Cart (ie: one that can be accessed via ...index.php?main_page=blahblah

You can build all the DB-query code you want inside the module file (in this case includes/modules/pages/about_us/header_php.php -- stuff the output into relevant variables, and then use the tpl_about_us_default.php template file to loop thru its content with appropriate echo statements as needed (or no loop if not an array, etc).

Generally, a "module" prepares data which can be used "for" display. This can be extracting from database, parsing POST/GET data, accessing external resources, etc.
The "language" files are used to define language-specific text "for" output.
The "template" files are used to render actual output. Sometimes this is done via include() and sometimes by echo ... sometimes both.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Feb 2007, 8:48 AM
#46
jagguy avatar

jagguy

New Zenner

Join Date:
Feb 2007
Posts:
64
Plugin Contributions:
0

Re: basics

DrByte:

I think the link above is what TinaS was referring to.

While the about-us contribution doesn't pull data from the database, it does demonstrate the infrastructure used for a new "page" in Zen Cart (ie: one that can be accessed via ...index.php?main_page=blahblah

You can build all the DB-query code you want inside the module file (in this case includes/modules/pages/about_us/header_php.php -- stuff the output into relevant variables, and then use the tpl_about_us_default.php template file to loop thru its content with appropriate echo statements as needed (or no loop if not an array, etc).

Generally, a "module" prepares data which can be used "for" display. This can be extracting from database, parsing POST/GET data, accessing external resources, etc.
The "language" files are used to define language-specific text "for" output.
The "template" files are used to render actual output. Sometimes this is done via include() and sometimes by echo ... sometimes both.

Hi,

I will check what you said and I did this also . I will try a php file as well but do i need to use ZC variables or is it all my own code?

I put the files in this location and
/includes/languages/english/custom/about_us.php
/includes/languages/english/extra_definitions/custom/about_us.php
/includes/languages/english/html_includes/custom/define_about_us.php

I see the link to the page and see the file in define pages aboutUs but the link fails page not found.

22 Feb 2007, 3:07 PM
#47
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: basics

jagguy:

I put the files in this location and
/includes/languages/english/custom/about_us.php
/includes/languages/english/extra_definitions/custom/about_us.php
/includes/languages/english/html_includes/custom/define_about_us.php

I see the link to the page and see the file in define pages aboutUs but the link fails page not found.

there are a few more files:
/includes/modules/pages/about_us/header_php.php
/includes/templates/YOURTEMPLATE/templates/tpl_about_us_default.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Feb 2007, 6:50 PM
#48
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,449
Plugin Contributions:
3

Re: basics

What I want to do is add php content and html/css for my own pages.
Answering one of your first questions... Try downloading the Dynamic Sideboxes module (Downloads Section in sideboxes).

This contribution is to display any of the sideboxes of ZC into a static HTML page you have WITHIN the ZC store (in same domain). The instructions are very easy to follow.

IDEASLady
IDEAS Creative Studio

Your image... our business!

23 Feb 2007, 11:07 PM
#49
jagguy avatar

jagguy

New Zenner

Join Date:
Feb 2007
Posts:
64
Plugin Contributions:
0

Re: basics

hi,
ok let me have a look at all this info i have got.