Author Topic: Where can I find the structure definitions for categories, products, etc.  (Read 2714 times)

bganek

  • Beginner
  • *
  • Posts: 7
I admit I'm new here and have tried to find this information but haven't been able to.  What I am looking for is a list, or a way to determine the list, of all the various properties, methods etc. that I can call from within a template to customize it.  For example, looking at a template, I see the code $product->votes->allvotes (after getting the product in a foreach look from $this->products).  Where can I find documentation to know that votes/allvotes is part of the product and that they other possibilities are?

I looked at the mySQL tables but that isn't everything and I looked at the developer's manual but that didn't have a layout and it is also for an older version of Virtuemart.

I can follow what is being done in the template code that I have looked at, but would like to also approach it from the other direction - i.e. see what is available and then work with that if possible.

Thank you.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: Where can I find the structure definitions for categories, products, etc.
« Reply #1 on: December 07, 2011, 19:59:37 pm »
http://forum.virtuemart.net/index.php?topic=90935.0
http://forum.virtuemart.net/index.php?topic=92756.0

You can access anything in the product table on the product page by using
$this->product->COLUMN_NAME

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

bganek

  • Beginner
  • *
  • Posts: 7
Re: Where can I find the structure definitions for categories, products, etc.
« Reply #2 on: December 08, 2011, 22:42:58 pm »
Hello, thanks for the reply.  I had seen those two threads previously but that doesn't look like the complete list of capabilities.  For example:

1) Category has things like category->haschildren and $category->images[0]->displayMediaThumb("",false); (from the category template)
2) Products has things like $this->product->neighbours ['previous']  and ($this->product->images[0]) (from the productdetails template)
3) The category template has this call $this->orderByList - which I figured out controls the search boxes on that page - but I discovered this by trial and error (we were trying to get this off the page), I haven't found any documentation on this.

These are more than just fields in a table I believe.

I'm assuming that there are some related structures in the database and some helper functions, I didn't know if there was a way to find them through some documentation.

Am I off base and missing something and it is right in front of me and I'm missing it?

Thank you,

Bruce

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: Where can I find the structure definitions for categories, products, etc.
« Reply #3 on: December 08, 2011, 22:45:43 pm »
no, there is not a full manual or anything yet. There will be more soon
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)