News:

Looking for documentation? Take a look on our wiki

Main Menu

Modules under certain categories or products

Started by EvanGR, September 27, 2018, 08:50:58 AM

Previous topic - Next topic

EvanGR

Hello,

I want to add some modules under certain products, or categories of products (e.g. include company logos, badges, labels etc...)

(ideally, batch add them to individual products by product category)

What would be a good (performant and easy to maintain) way of doing this?

Thanks

Jörgen

Using Joomla core functions you can set up menu for the categories you want to have special attention and set up modules to be displayed for this category only. These modules coud be easily maintaned.

If the options for displaying this are not precise enough I can recommend the advanced module manager, I use the pro version. It is not an easy extension to use, but You have great possibilities to display modules as You like.
https://www.regularlabs.com/extensions/advancedmodulemanager

You could add items in your product description instead and use the free plugin include_content_item to insert articles in the product description. The you only edit the articles when changes are neccesary. A little bit similar to using modules.
https://www.kksou.com/php-gtk2/Joomla/Include-Content-Item-plugin.php

Hope this could be of help

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

EvanGR


Jörgen

Good Luck, Please let us know what You decied to go for.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

PRO


In your product details template, to show a module by the category id.


<?php
jimport('joomla.application.module.helper');
$modules = JModuleHelper::getModules($position);
foreach ($modules as $module) {
echo JModuleHelper::renderModule('cat'.$this->product->virtuemart_category_id);
}
?>

THEN: you setup a module via module manager.

for the position
type in catcategory_ID

for example, the category id 345
the position is cat345

EvanGR

Thank you all...

Could something similar be done with Joomla articles, instead of modules?

For product texts that require repetition, I could embed one or more Joomla articles and save on time and trouble. Possible?

Joomla articles are a lot easier to organize than modules.

Thanks

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EvanGR

I know of that plugin by Regular Labs. I did not know if it was compatible with VM products, or if there was a native Joomla/VM method of doing the job.
Thanks!

Jörgen

Quote from: Jörgen on September 27, 2018, 09:40:21 AM
You could add items in your product description instead and use the free plugin include_content_item to insert articles in the product description. The you only edit the articles when changes are neccessary. A little bit similar to using modules.
https://www.kksou.com/php-gtk2/Joomla/Include-Content-Item-plugin.php

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

EvanGR


Studio 42

For product, you can use custom fields and change render in category to add it.
Some template can use badge on checking the stock for eg.
Using this method is faster that using Joomla plugins most time and you can mass add/remove customfields using my tool vm be PRO or import it using csvi or my tool VM be pro.

GJC Web Design

As Patrick says -- if a client wants to have particular content shown in VM at a particular cat etc then text custom fields are the normal approach displayed in the template by an if statement to filter them
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation