Author Topic: Modules under certain categories or products  (Read 314 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 133
Modules under certain categories or products
« on: September 27, 2018, 08:50:58 am »
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 1721
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Modules under certain categories or products
« Reply #1 on: September 27, 2018, 09:40:21 am »
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.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

EvanGR

  • Jr. Member
  • **
  • Posts: 133
Re: Modules under certain categories or products
« Reply #2 on: September 27, 2018, 10:56:47 am »
Yes, it helps... thank you very much!

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1721
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Modules under certain categories or products
« Reply #3 on: September 27, 2018, 13:02:35 pm »
Good Luck, Please let us know what You decied to go for.

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10282
  • VirtueMart Version: 3+
Re: Modules under certain categories or products
« Reply #4 on: September 29, 2018, 17:22:58 pm »

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
I do NOT do development work for hire.

EvanGR

  • Jr. Member
  • **
  • Posts: 133
Re: Modules under certain categories or products
« Reply #5 on: October 02, 2018, 08:54:12 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8200
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Modules under certain categories or products
« Reply #6 on: October 02, 2018, 10:13:28 am »
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EvanGR

  • Jr. Member
  • **
  • Posts: 133
Re: Modules under certain categories or products
« Reply #7 on: October 02, 2018, 13:14:54 pm »
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 1721
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Modules under certain categories or products
« Reply #8 on: October 02, 2018, 13:39:51 pm »
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.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

EvanGR

  • Jr. Member
  • **
  • Posts: 133
Re: Modules under certain categories or products
« Reply #9 on: October 02, 2018, 13:54:21 pm »
I missed that bit, sorry, and thanks!

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3399
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
Re: Modules under certain categories or products
« Reply #10 on: October 02, 2018, 13:56:36 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8200
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Modules under certain categories or products
« Reply #11 on: October 02, 2018, 14:07:14 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation