*

krallen

  • ***
  • 48 posts
Hi Osclass Community,

I’ve noticed a small inconsistency in how breadcrumbs are handled on search result pages. Even when the "Country name" option is unchecked in Breadcrumbs Settings (Listings page), the country still appears in the breadcrumb trail on search pages.

After investigating the core files, I found that the logic in Breadcrumb.php checks for this setting on individual item pages, but skips the check for search pages.

Affected File: oc-includes/osclass/classes/Breadcrumb.php

The Issue:
In the case('search') block, the country is added to the breadcrumb as long as a country value exists, regardless of the admin settings.

Proposed Fix:
We should add the osc_item_breadcrumbs_country() check to the search location block to ensure it respects the admin preference.

Find (around line 270):

PHP

Code: [Select]
if($p_country != '') {Replace with:

PHP

Code: [Select]
if($p_country != '' && osc_item_breadcrumbs_country()) {Why this is needed:
In the case('item') section of the same file, Osclass correctly uses osc_item_breadcrumbs_country() to decide whether to show the country. Adding this to the search section makes the breadcrumb behavior consistent across the site.

Hope this helps improve the core!

Best regards.

*

MB Themes

There is not specific setting for search page at this moment.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots