Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jun 2006
    Posts
    21
    Plugin Contributions
    0

    API Documentation?

    I've been working on my own template loosely based on the default one. I've got it mostly functional, but I still have a ton of work to do. Things are going slower then they should be because I spend much of my time just figuring out how to insert a particular bit of information. I'm getting everything figured out, but digging through the code each time I need to know something gets very time consuming & distracting. It would be MUCH easier if there was a list of predefined variables and functions that are available to template designers. The Wiki link for the API lists such a thing as "to do". Is there such a doc elsehwhere that I'm just missing?

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

    Default Re: API Documentation?

    Uh... what are you trying to do that you are having to dig through the code?

  3. #3
    Join Date
    Jun 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: API Documentation?

    Quote Originally Posted by Kim
    Uh... what are you trying to do that you are having to dig through the code?
    Nothing complicated... By "dig through the code", I mean through the template code, not the underlying Zen cart code. Most of the info I've needed is pretty simple-- How do I insert the manufacturers name, for example. All the information is available, but the lack of a simple list of available variables & functions makes things a lot more difficult & time consuming then it needs to be. I'm starting to consider scrapping what I've done so far & starting from scratch, so it would be a good time to find such documentation if it existed.

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

    Default Re: API Documentation?

    How do I insert the manufacturers name
    If you are talking about the manufacturer of a product, this is attached through the product entry in the admin.

    If you mean the box heading, use the admin > tools > devtoolkit > and enter the term bottom left, set the dropdown to all catalog files and search...you will find it in the english.php file...

  5. #5
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: API Documentation?

    within your product-display template, tpl_product_info_display.php, you'll see that for "that" page, the manufacturer's name for that product is contained in $manufacturers_name.

    Here's a code-snippet where it's used in that file, by default on line 122:
    PHP Code:
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
    .
    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.

  6. #6
    Join Date
    Jun 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: API Documentation?

    Sorry, I may not have been clear. That was only an example of the things that I've had to figure out, not a question. I figured it out, but I had to do it the hard way (and of course, that was a fairly trivial example). It would be wonderful if Zen Cart had this stuff documented, though.

    Here's another example... What does this random function do, and what variables do I need to pass it when I call it?

    zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action'))


    You don't need to actually explain it, that was just a randomly chosen function from the template, but hopefully it illustrates my frustration. I'm trying to build a site that isn't a cookie cutter of every other shopping site on the internet. That means that I'm doing some pretty substantial hacking at the default template, and it's going MUCH slower then it would if I had better documentation.

    Don't take this as a complaint. I understand the nature of Open Source, and I am happy to work on contributing to such documentation if it doesn't exist. But like my original post said "Is there such a doc elsewhere that I'm just missing?"
    Last edited by mpayson; 23 Aug 2006 at 02:34 AM.

  7. #7
    Join Date
    Jun 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: API Documentation?

    And I suppose I should mention that I do know to use the dev toolkit to find the functions, but they're usually not terribly well documented or commented. An API doc would be truly useful...

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

    Default Re: API Documentation?

    If you have looked around, there is barely basic documentation available over the FAQ's and the wiki... much less more in depth documentation that you are seeking.

    Yes, it would be nice and truly useful, and people in the desert want Ice Water...

  9. #9
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: API Documentation?

    The docs for this are a work in progress. Stay tuned.
    .
    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.

  10. #10
    Join Date
    Jun 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: API Documentation?

    Quote Originally Posted by kobra
    If you have looked around, there is barely basic documentation available over the FAQ's and the wiki... much less more in depth documentation that you are seeking.

    Yes, it would be nice and truly useful, and people in the desert want Ice Water...
    Not a particularly helpful comment, now was that. My original question, which I will repeat for the third time was "Is there such a doc elsewhere that I'm just missing?". The answer to that question is apparently "no". Fine, that was all that I asked. The process will be slower, but I'll get by, and I may be able to contribute a bit to what little documentation that does exist. But if I had spent all that extra time figuring things out the hard way, only to discover that I just hadn't located the appropriate page in the docs, I'd look a bit foolish, wouldn't I? Seemed to warrant posting what was really a pretty simple question.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. PayPal API Certificate vs. API signature
    By fssi2100 in forum PayPal Website Payments Pro support
    Replies: 0
    Last Post: 14 Jan 2011, 07:21 PM
  2. HOW TO CHANGE FROM API signature to API certificate?
    By joyint in forum PayPal Website Payments Pro support
    Replies: 1
    Last Post: 24 Aug 2008, 08:34 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