*

SIG

  • ***
  • 31 posts
Attach a map to individual categories?
« on: February 13, 2023, 07:32:45 PM »
How and where to insert the map code into the search, but so that the map is displayed only in the categories I need, and not in all?
Let's say I want the map to be displayed only in 3 categories and not in all. What should I do for this?

Marked as best answer by SIG1 on February 14, 2023, 04:41:20 PM
*

MB Themes

Re: Attach a map to individual categories?
« Reply #1 on: February 14, 2023, 02:37:30 PM »
@SIG
When you insert map on search/item page manually, you can check based on category ID.
Let's say it's item page, then:
Code: [Select]
if(in_array(osc_item()['fk_i_category_id'], array(1,2,3,4,5))) {
  .. map code ...
}
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

SIG

  • ***
  • 31 posts
Re: Attach a map to individual categories?
« Reply #2 on: February 14, 2023, 04:41:09 PM »
@SIG
When you insert map on search/item page manually, you can check based on category ID.
Let's say it's item page, then:
Code: [Select]
if(in_array(osc_item()['fk_i_category_id'], array(1,2,3,4,5))) {
  .. map code ...
}

Thank you very much, I understand!

*

MB Themes

Re: Attach a map to individual categories?
« Reply #3 on: February 14, 2023, 06:33:57 PM »
Welcome
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots