Thread: basics

Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 48
  1. #11
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: basics

    What is confusing me is the interaction between modules and templates with php code.
    In zencart modules I see php/mysql code but no echo statements.
    There are functional files that retreive the data and the template files 'tpl' that describe how this is to be displayed.

    You can work around this if you wish but realize that in some cases you will lose the ability to control from the admin and or the dynamic nature of the cart. Or as it can be termed this will end up being hard code.
    Zen-Venom Get Bitten

  2. #12
    Join Date
    Feb 2007
    Posts
    61
    Plugin Contributions
    0

    Default Re: basics

    well the php code in modules isn't easy to understand and neither is it regarded as 'common php practice'.
    To code like that would be near impossible for a newbie to zencart.

  3. #13
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: basics

    I don't really get what you are trying to do, and my own knowledge of php is very limited, but the structure here seems quite straightforward to me... the module file compiles the content from a variety of sources and the template file displays it.

    Perhaps if you could give an example of what you are trying to achieve, we may be able to understand your argument better - but why not just go ahead and try to do it the way you want to?
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  4. #14
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: basics

    Code:
    neither is it regarded as 'common php practice'.
    Well, what you don't think is common practice actually is common practice....
    What has essentially been done is to separate the logic from the presentation. Being that the code in the template files can be rearranged to your hearts content can you imagine what would happen if the two were mixed together. There isn't enough time in the day to answer all the questions from "noobies" that would break things. So for those that don't need to mess with the logic, it has safely been tucked away where they don't have to see it. I do understand why you would like the logic and presentation together but in this enviroment it would be a nightmare to support.
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  5. #15
    Join Date
    Feb 2007
    Posts
    61
    Plugin Contributions
    0

    Default Re: basics

    It is adding your own pages with content that is confusing me . I am trying to fit into a pre-defined system ( which I need to know how to make mods to ).

    Ok maybe I need to explain with an example.

    I have a php file that gets say all the category names and i want them displayed in a html table, and maybe some css with it. The coding is simple enough.

    It is easier to have the php stuff in 1 file and css/html in another. Now I want this page in the content area, and a link to it in a sidebox.

    Do I create an ezpage and add it all in but the thing is in 2 files? So do i just add the whole code in 1 file.

    How do i add a content page with php/css/html?

  6. #16
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: basics

    ezpages and the defines pages can only parse html - php will not parse in these pages
    Zen-Venom Get Bitten

  7. #17
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: basics

    not exactly true kobra

    maybe reading this thread will help you.....http://www.zen-cart.com/forum/showth...ht=php+ezpages

    I wish I understood more what this page is for......as it seems to be familiar....kinda like display categories on main page.....which there is a switch for in the admin someplace......but I don't know what your end result is supposed to be...
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  8. #18
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: basics

    Mike,

    Looked at that and I am with Ajeh on this(and if Ajeh is finding this problematic...Well!!!:
    Quote Originally Posted by Ajeh
    I can see it is coded to do this ... but I am having a user moment here ... and not getting it to actually execute the php code ... so what's the trick?
    I will have to investigate further but am leery about DrBytes caution also, and if this actually is supported and will validate properly

    jagguy,

    Can you provide a susinct example of exactly what you are trying to do?? Please not maybe this and maybe that....
    Zen-Venom Get Bitten

  9. #19
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: basics

    ok well I didn't read the whole thread on that one but I thought it maybe pointed towards where he was wanting to go........my bad
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  10. #20
    Join Date
    Feb 2007
    Posts
    61
    Plugin Contributions
    0

    Default Re: basics

    What I want to do is add php content and html/css for my own pages. I gave an example but why am I getting people say explain what is it you are trying to do? I am trying to understand what zencart can and can't do.

    I have existing websites I want to fit in but if all zencart CAN do is use an existing layout with minor changes only then it is a little limited, and maybe for a person without much IT background.

    Ecommerce carts like this are just php/html/css/JS that someone has created.


    The 'what is it you are trying to do exactly' replies can be explained . It is simple, I am trying to develop flexible websites that don't all look the same.

    q)Can you add your own php content to a new page and display in content area? how?

    It is a general question to see if you zencart can ( i gave an example earlier for a php data table ).



    q)Can you add a page with php/html/js? How?

 

 
Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. v154 Right Back to Basics
    By adb34 in forum Basic Configuration
    Replies: 3
    Last Post: 3 Apr 2015, 04:34 PM
  2. Back to Basics w/a Glitch
    By sammirah in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 10 Apr 2012, 08:12 PM
  3. layout basics
    By mex in forum Templates, Stylesheets, Page Layout
    Replies: 22
    Last Post: 23 Feb 2007, 05:09 AM
  4. Credit Card Basics
    By LeJerque in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 19 Dec 2006, 04:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg