VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Setup1337 on November 07, 2011, 14:45:12 PM

Title: Tutorials?
Post by: Setup1337 on November 07, 2011, 14:45:12 PM
I am pretty confused on how VirtueMart templating works. Are there any good tutorials?

One of my main questions is that how do you actually display a VirtueMart component in the website? What do you have to write into the index.php file? If it is jdoc:include then what do you have to put in the name="" and type="" field? Are the names that you have to put there changeable somewhere?
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 15:14:20 PM
http://forum.virtuemart.net/index.php?topic=90935.0
http://forum.virtuemart.net/index.php?topic=92756.0


ALSO; are you building a joomla template from scratch?

include "component" just like any other joomla component
Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 15:50:53 PM
Yes I am building the template from scratch because the website is going to be very specific.

What do you mean by "include component"? I'd really like a specific instruction on, for example, how to display the product categories as a menu list on the side of my site.
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 16:08:16 PM
there is a module that comes standard with vmart. It will show all the categories.

Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 16:29:42 PM
But how EXACTLY do I implement it? What line do I have to write into the index.php file?
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 16:42:53 PM
Maybe its best for you to choose a standard joomla template, and customize it.

BUT, this might help.
http://www.barryflood.com/blog/34-blog/94-tutorial-creating-a-joomla-17-compatible-template.html
Title: Re: Tutorials?
Post by: zorkhh on November 07, 2011, 16:45:48 PM
<jdoc:include type="message" />
<jdoc:include type="component" />

... there are good books available about creating Joomla Templates.

Or take one of the default J! Templates and check how they work.
Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 16:52:00 PM
I have made a Joomla website before, I know about jdoc:include. What I wanted to know is how to I use VirtueMart with it. For example, to show the category listing as a menu on my website (with exact instructions).

This is the website I made (it is not completely finished), in case you don't believe that I've made one http://sinipixel.ee/Finnframe/index.php/et/
Title: Re: Tutorials?
Post by: zorkhh on November 07, 2011, 17:00:45 PM
You don't need to add special commands to the index.php for Virtuemart. It is loaded just like any other component.

You should at least add a Virtuemart menu item and activate one of the virtuemart menu / category modules in an active module position.
Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 17:07:59 PM
I must be pretty stuck with standard templating because I am not following you. What I understand is that including a component means that you are including the article linked to that page?

If you use "jdoc:include component" (pseudocode) doesn't that simply show the article for that site in that particular position? How do you tell VirtueMart where you want the menus to go, where you want the products to go, etc.?
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 17:24:33 PM
This   <jdoc:include type="component" />

IS DYNAMIC, so it will include virtuemart on virtuemart pages, and content on content pages.

Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 17:25:36 PM
go into your menu manager, and click NEW menu item. CHOOSE virtuemart default layout as the type
Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 17:39:27 PM
I will see what I can do.

Do you happen to have MSN or something though? This website I am making might spark a lot of questions, so it would be really good if I could directly ask questions. Thanks in advance.
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 17:51:52 PM
NO, I only help in the forums. Sorry.

Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 17:53:36 PM
Oh, okay then.

Your next post will be your 6,000th :)

I wrote the jdoc:include component into the div that has must have the category listing with Joomla menus as well, and as I expected, nothing showed up in there. Could you tell me specifically what I have to do?
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 18:04:18 PM
component is NOT a module.

YOU need to PUBLISH the category module IN THE MODULE position you want
Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 18:28:15 PM
I can't seem to be finding those modules, where are they located?
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 18:31:57 PM
setup, I think you are in need of basic joomla knowledge.

Are you having problems finding the modules in the module manager?

Or module positions?

Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 18:33:01 PM
Module manager is not showing ANYTHING relating to VirtueMart for me.
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 18:34:16 PM
did you install the all in one component?

com_virtuemart_ext_aio.1.9.8J

IT has many modules in it.

It comes with the download
Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 18:39:18 PM
Ummm I don't know, can I have the direct link?
Title: Re: Tutorials?
Post by: PRO on November 07, 2011, 18:43:36 PM
its in my signature
Title: Re: Tutorials?
Post by: Setup1337 on November 07, 2011, 22:34:35 PM
OK, adding that missing module fixed the problem of not finding modules.

I still have a problem though. In the main page there has to be a list of featured products, but it is not showing any products. The module is positioned in "catfeatured" and this code is in the index.php: <?php if ($this->countModules('catfeatured')) : ?>
                test
                <jdoc:include type="modules" name="catfeatured" style="" />
                <?php endif; ?>


I also made one sample product, added it into a category and checked the "on featured", but I am still not seeing anything on the main page. The text "test" appears, indicating that the module IS there.
Title: Re: Tutorials?
Post by: PRO on November 08, 2011, 12:37:23 PM
did you assign a module to that position?
Title: Re: Tutorials?
Post by: Setup1337 on November 10, 2011, 15:31:15 PM
What the? I thought I posted an answer already but it disappeared :S

Anyways, I assigned that module the position "catfeatured" and when I tested the PHP if-then-else with the word "test", it worked, indicating that the module is on that page, but not being displayed.
Title: Re: Tutorials?
Post by: PRO on November 10, 2011, 15:46:14 PM
is it assigned to ALL pages?
Title: Re: Tutorials?
Post by: Setup1337 on November 10, 2011, 15:54:51 PM
Yes, it is.
Title: Re: Tutorials?
Post by: PRO on November 10, 2011, 16:18:07 PM
sounds like you are doing something wrong with your joomla template.

I cannot help with joomla templates
Title: Re: Tutorials?
Post by: Setup1337 on November 10, 2011, 16:36:09 PM
If I would be assigning the module wrong then I would not be able to see the text "test", wouldn't I?

Maybe I am adding a product wrong? Is there a tutorial on that?
Title: Re: Tutorials?
Post by: PRO on November 10, 2011, 16:55:52 PM


do you have "show products out of stock"

enabled?
Title: Re: Tutorials?
Post by: Setup1337 on November 10, 2011, 17:00:02 PM
Ummmm, where is that?
Title: Re: Tutorials?
Post by: PRO on November 10, 2011, 17:16:03 PM
in your vmart configuration
Title: Re: Tutorials?
Post by: Setup1337 on November 18, 2011, 00:09:49 AM
The solution worked, but I have run into a new problem. My apologies for not telling earlier, that the solution worked, I hope nothing bad happened for it.

How do I display product categories as images? I know how to display categories as a list.

What I am meaning is that I have a thumbnail list on the main page of all product galleries and a thumbnail of any category will be the first product of that category.

For example, when I have categories for forks and spoons, they are both displayed as a list in the side menu and also as a thumbnail gallery, with a fork thumbnail on the first category and a spoon thumbnail on the second category, in the main area.
Title: Re: Tutorials?
Post by: moreno84 on February 18, 2015, 11:17:44 AM
Are there any video tutorials available to learn template management?

Thanks and pls keep up good work!

Title: Re: Tutorials?
Post by: jenkinhill on February 18, 2015, 12:31:37 PM
Why add this to a 3 year old thread?  Somebody may have put a video or two on Youtube but I'm not aware of any. Since templating has been updated further with VM3 then any old tutorials would not really be relevant. VM (as with other Joomla component templating) follows a standard and logical system, the ability to use layouts having been around since Joomla 1.5 was first introduced. VirtueMart templates are named in an easy to understand format, and all blocks in the template are annotated, so any developer with even the most basic skills should be able to work out how & where to make any edits.
Docs are at http://docs.virtuemart.net/tutorials/templating-layouts.html

OTOH if you want to volunteer some time and make some videos then please, feel free to do so.
Title: Re: Tutorials?
Post by: GJC Web Design on February 18, 2015, 12:40:56 PM
ah the younger generation -- if it ain't a video it doesn't exist...   ;)
Title: Re: Tutorials?
Post by: jenkinhill on February 18, 2015, 13:33:15 PM
Yeah, just a few years ago they used to ask for books ........