yes.........I think....don't know never had to put my own php in a sidebox.....try it let me know how it turns out
yes.........I think....don't know never had to put my own php in a sidebox.....try it let me know how it turns out
Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!
There are functional files that retreive the data and the template files 'tpl' that describe how this is to be displayed.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.
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
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.
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 !
Well, what you don't think is common practice actually is common practice....Code:neither is it regarded as 'common php 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!
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?
ezpages and the defines pages can only parse html - php will not parse in these pages
Zen-Venom Get Bitten
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!
Mike,
Looked at that and I am with Ajeh on this(and if Ajeh is finding this problematic...Well!!!:
I will have to investigate further but am leery about DrBytes caution also, and if this actually is supported and will validate properlyOriginally Posted by Ajeh
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