Author Topic: [SOLVED] Get Category images?  (Read 788 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 493
[SOLVED] Get Category images?
« on: June 03, 2022, 09:33:12 am »
Hello,

I am trying to get the images for a category in a custom module I am working on.

I can get the category by doing:
$categoryModel->getCategory($catId);

However I don't see the images for the category.

I am interested in getting the filenames so I can use them in my code (instead of the built-in displayMediaThumb method)

Thanks

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10691
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Get Category images?
« Reply #1 on: June 03, 2022, 10:39:59 am »
$category = $categoryModel->getCategory($catId);
$categoryModel->addImages($category);

does that work?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EvanGR

  • Jr. Member
  • **
  • Posts: 493
Re: Get Category images?
« Reply #2 on: June 03, 2022, 11:34:56 am »
Yes, thank you very much!