Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jun 2007
    Posts
    54
    Plugin Contributions
    0

    Default Understanding Zen Cart Architecture

    I come from a long history of working and developing with osC, but I am trying to leave the dark side and come into the light with ZC.

    I'm in the process of trying to port an osC payment module over to ZC. I found that using the basic CC payment module as a model, I was able to convert the osC payment module mostly by changing some of the differences in function calls.

    Now the real challenge comes in that this particular payment module also calls for changes in other standard files, for example payment_process.php, this is where things are really starting to get different and I'm a little lost where to go.

    I have however been studying the information in the wiki to come to an understanding of how things are put together in ZC. In particular I'm trying to wrap my brain around the architecture of application_top. I'm somewhat familiar with the auto-loader concept from other development work I have done and the concept of overrides.

    The immediate question I have is that I need to make some additions to filenames.php and database_tables.php. Is it correct form to add to these files or should a custom version of these files be created and the additions placed there?

    And if someone wants to give me a hint or two about working with changes to payment_process.php or other such files, that would be cool too.

    Thanks,
    stage

  2. #2
    Join Date
    Jun 2003
    Posts
    33,823
    Plugin Contributions
    0

    Default Re: Understanding Zen Cart Architecture

    Welcome stage-

    Kim here - formerly BirdBrain.

    You can add additional file to the extra_datafiles and or extra_configures as needed. There are also the init_includes available for adding additional functionality without touching core code.
    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.

  3. #3
    Join Date
    Jun 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Understanding Zen Cart Architecture

    Hi Kim,

    Thanks for the welcome and quick reply.

    I see how that works. Are the files in those "extra" directories automatically loaded or do they need to be declared somewhere else?

    I've been developing software for a long time and have to say that I am impressed with the work I see here.

    Stage

  4. #4
    Join Date
    Jun 2003
    Posts
    33,823
    Plugin Contributions
    0

    Default Re: Understanding Zen Cart Architecture

    Those directories are self-loading.

    Have fun with Zen Cart.
    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.

  5. #5
    Join Date
    Jan 2004
    Posts
    60,305
    Blog Entries
    4
    Plugin Contributions
    51

    Default Re: Understanding Zen Cart Architecture

    Additionally, this program-flow doc may help clarify some things:
    http://www.zen-cart.com/index.php?ma...roducts_id=378
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.



  6. #6
    Join Date
    Jun 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Understanding Zen Cart Architecture

    thanks for the tip DrByte.

    From what I've seen I'm very impressed by the work of the core team. You have put together a very robust and flexible system.

    When I think of successful opensource systems, in particular with those written in PHP, Joomla! and osCommerce come to mind. The thing both of those systems have in common is an extensive library of contributions/extensions/modules.

    Joomla! has been successful in that regard because they have a well documented API including well written tutorials on the process of developing extensions. osC has a lot of contributions because the system is prime for hack style coding. Of course that is also its greatest weakness.

    Zen Cart has done a good job as an osC fork to correct many of the inherit issues with osC. I've noticed that many of the more popular osC contributions are part of the ZC core. So perhaps, add on modules are considered a lower priority. I would still say that encouraging module development is something very important to the overall success to the system. From what I've seen of other available options, commercial and opensource, there is no reason why ZC could not be the best and most popular choice out there. Is that one of the goals here?

    The flowchart gives a nice high level view of what happens when a page loads. As someone new to the system, I would love to see other such flowcharts dealing with specific shopping cart functions, starting with payment, then shipping, which are the most important things. You can have the most beautiful site there is, but if you can't accept payments or set up shipping of products, how useful is it.

    I've done a lot of work with osC and without exception every client that I've had, has not used paypal and required some customized effort in the payment module area. So at least from my experience, that's something that comes into play a lot.

    I actually use the word "client" loosely, because I've never charged nor made any money working with opensource code. Not that I have anything against that, nor would I mind at some point earning a few supplemental dollars. It's just my primary motivation is A) I enjoy helping people and B) I enjoy the work itself.

    Again I applaud the work done here and from what I have experienced from the community, you all seem like a friendly bunch.

    thanks,
    stage

  7. #7
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    76
    Plugin Contributions
    0

    Default Re: Understanding Zen Cart Architecture

    I found the wiki documentation very useful, but there are a lot of differences in the file structure, it seems - from the OSC way to the new 1.3.8 way. I am trying to port a gift registry over, and I am finding the sheer amount of code on the OSC a little crazy. Zen Cart team has done very good job of cleaning up the amount of code, making it lighter and cleaner.

    I bought the book, which should be arriving tomorrow. Does the book go into much detail about how construct and write modules?

    I can easily go through and modify the code as outlined in that wiki document, but it seems like I would be modifying the core which I understand is a bad thing.

    thanks in advance...
    hmmn. really?

  8. #8
    Join Date
    Jun 2003
    Posts
    33,823
    Plugin Contributions
    0

    Default Re: Understanding Zen Cart Architecture

    I bought the book, which should be arriving tomorrow. Does the book go into much detail about how construct and write modules?
    No, the book was written as an owner's operating guide.
    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.

  9. #9
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    76
    Plugin Contributions
    0

    Default Re: Understanding Zen Cart Architecture

    Quote Originally Posted by Kim View Post
    No, the book was written as an owner's operating guide.
    I'm glad I bought it anyway - I am sure it will help on many levels!!!

    Is there a resource, I would be perfectly happy to pay for it, which can point me in a good direction for writing modules. Perhaps a step by step guide to writing a module, with examples. That would be idealistic.
    hmmn. really?

  10. #10
    Join Date
    Mar 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Understanding Zen Cart Architecture

    Elastic,

    Did you ever find any documentation on developing modules? I'm at the same point you were in December.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Using zen cart payment system
    By Lorelai in forum General Questions
    Replies: 1
    Last Post: 20 Jan 2007, 05:55 PM
  2. Zen Cart Being Fully Capable
    By jtatarin in forum General Questions
    Replies: 1
    Last Post: 20 Jan 2007, 11:14 AM
  3. Question about Zen Cart
    By ajcannon in forum General Questions
    Replies: 7
    Last Post: 8 Aug 2006, 10:28 PM

Bookmarks

Posting Permissions

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