Advertisement:

Author Topic: [SOLVED] showing other premium items in category listing with no premium items  (Read 1287 times)

operasail

  • Newbie
  • *
  • Posts: 3
Hello,

What is the simplest way to enable showing premium items from other/all categories in a category listing that has no premium items of its own?

Thanks for any help
« Last Edit: January 10, 2017, 12:14:40 am by operasail »

operasail

  • Newbie
  • *
  • Posts: 3
Re: showing other premium items in category listing with no premium items
« Reply #1 on: January 08, 2017, 10:17:11 pm »
I am still looking into this and believe its doable using osc_query_item($params) https://doc.osclass.org/Display_only_certain_type_of_listings

so in oc-content/themes/bender/search.php I have

if(osc_count_premiums() > 0) {
 ... display premium items code
}
else
{
  osc_query_item(array("premium" => 1,"results_per_page" => 2));
   ... then display results here
}

my question now is how to use View::newInstance()->_exportVariableToView to display custom_items ?

Thanks for any help

operasail

  • Newbie
  • *
  • Posts: 3
I found the solution by using same osc_query_item code provided by calinbehtuk in this thread http://forums.osclass.org/general-help/premium-ads-from-one-category-in-homepage/msg129891/#msg129891

I simply removed this part from the code: 'category' => '117',  so I get premium items from all categories.