Display all products under the sub-categories of the current category too VM2

Started by vanaveno, February 11, 2012, 09:21:41 AM

Previous topic - Next topic

franci77

Hi,

Even though this code update actually works, there is a problem that the subcategories products aren't actually assigned to parent categories, and because of that if anyone noticed, you can't filter products by manufacturers.

Besides, the file got overwritten, when you updated VM.

So I found another solution. There is a plugin: http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions/virtuemart-categories/23074
The plugin will assign all subcategory's products also to parent categories. So you will have subcategory's products also displayed when you are on parent category view. And now you can also filter them by manufacturers and you don't have to worry about the updates.

Note that product.php should be in default state. And BACKUP your database BEFORE you assign products to parent categories in case you don't like the results.


Best regards,
Franci


liquid.ideas

Thanks Guys, you are all awesome!! Worked like a bomb!! Anyway do you think this could be done as an override?
Perhaps Ivus will know. Thing is there are a couple of places I cant override, like if I put this (above fix) into:

templates/my_template/html/com_virtuemart/models it doesnt do anything, I actually have to put it in the admin folder.

I also have the same problem over writing the featured products if I put the single.php file into:

templates/my_template/html/mod_virtuemart_product/ it wont override either?

I know I went a little off topic here but I would like to override the fix, anyone know where I am going wrong?


Maxim Pishnyak

Maybe JHacks extension could automate such tasks (files in models folder etc), how do you think?

As for "mod_virtuemart_product" case:
what are you doing and what is going wrong?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

liquid.ideas

HI Maxim,

To explain, If I create a featured products module, in the drop down parameters you can select which php file to use eg: single, default etc. so to do a template override, I used templates\my_template\html\mod_virtuemart_product\tmpl\singlejofeat.php, but In the module I cannot select the file that I created which is: singlejofeat.php unless I have it in modules/mod_virtuemart_product/singlejofeat.php, not ideal if I update VM, any ideas?

Regards,

Jo

Maxim Pishnyak

I doubt that VM update will overwrite file like modules/mod_virtuemart_product/singlejofeat.php. Just use for 'singlejofeat.php' file enough unique filename.

Could you have 'singlejofeat.php' in modules/mod_virtuemart_product/singlejofeat.php just for fashion?
Any way instead that file another one tween in templates\my_template\html\mod_virtuemart_product\tmpl\ will be used.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Ninjab

Hi there, I have tried this and it didnt do anything when displaying in category view. My sub categories were exactly the same in its parent category page.

What I am trying to do is this layout:

Category Title
         Sub Category Title
                Product 1    Product 2    Product 3

         Sub Category Title
                Product 1    Product 2    Product 3

Ultimately this would be on the site I am working on as:

Notebook Bags
         
          Ultrabook Bags
                 Product 1    Product 2    Product 3

          Macbook Bags
                 Product 1    Product 2    Product 3

I don't want to display any products from parent category (well I won't have any there anyway :)) and the sub categories need to have their titles and products listed below. I want to display the hierarchy like this page: http://www.incipio.com/cases/iphone-cases/iphone-5-cases.html

I have also attached an image that is how I would like to have it to better explain.

Thanks :)

[attachment cleanup by admin]

Maxim Pishnyak

Did you have any success with your "Only Sub-categories in Category view" thread?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Ninjab


Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Ninjab

The current status is my template looks like my attached image now. But I need it to look like the my earlier attached image which is my 2nd attached image here.

The sub categories only list their picture and name. I need only the name (title) of the sub category/s to be listed in the parent category view and their products listed under each sub category title.

All I need is the parent title to be at the top, then the pagnation. Under that to be sub category titles, and under each sub-cat title is their products. As mentioned like in the link from Incipios page.

Thanks.

[attachment cleanup by admin]

Maxim Pishnyak

To get rid of category images you need to edit template override.

Have you any success with adding products with this:
Quote from: Ninjab on August 10, 2013, 19:26:05 PM
OK thanks I have found it that way via google. I will try altering the code to do that and inspect that thread.
?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Ninjab

getting rid of the parent category image is not the problem, I can do that.

I need this layout:

Category Title (sleeves)
         1st Sub Category Title (iPad)
                Product 1    Product 2    Product 3

         2nd Sub Category Title (iPad mini)
                Product 1    Product 2    Product 3

So far the current layout is the sub categories at the top. And they do not list any products under them.

Ninjab


Mana