VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: mcarazzo on March 30, 2016, 05:02:27 AM

Title: display all categories and products on the front page
Post by: mcarazzo on March 30, 2016, 05:02:27 AM
Hi
Im just working on a very simple site.

I need to create a single page where I can display all the categories and all the products inside each category. I have just 6 categories and 3 products in each one.

I could find a good way to do that. Should I modify the view or try installing a module?

Also each product should have the link to be added into the cart.

Regards

Title: Re: display all categories and products on the front page
Post by: Studio 42 on March 30, 2016, 12:23:18 PM
The simples way to add all product in main page  is to use a main category and add all product in this category.
eg.
MAINCAT <- all product in this category
-subcat1 3 products
-subcat2 3 products
...
And add a menu link to this main category
Title: Re: display all categories and products on the front page
Post by: mcarazzo on March 30, 2016, 15:46:35 PM
Thanks for your answer.

I mean that I want to display all categories and all products there. Also I can create a new view if it is the best scenario.
Something like this:

Category 1
     Product 1.1 (Link to add to cart)
     Product 1.2 (Link to add to cart)
     Product 1.3 (Link to add to cart)
Category 2
     Product 2.1 (Link to add to cart)
Category 3
     Product 3.1 (Link to add to cart)
     Product 3.2 (Link to add to cart)


And a button to checkout in a modal window.

Thanks!
Title: Re: display all categories and products on the front page
Post by: Studio 42 on March 30, 2016, 18:03:16 PM
This need then to redo a loop for subcategories and get product in this categories.
The code is too long to write, but you can use an existing category layout and modify it for your needs and force this in your menu link.