*

jcarrolo01

  • *****
  • 256 posts
Dear all..

I'm buildong a small plugin to filter the listings from selected categories to be displayed in premium listings on home page...

I already do the same for latest listings and its working properlly, but now for Premium listings in home page im getting some problems.... So im here to ask a little help to improve my site...

In main.php i'm placing this code before premium loop
Code: [Select]
<?php
//Start
$premium_categories PluginCategory::newInstance()->listSelected('skip_premium');
$premium_categ_list implode(', '$premium_categories);
//$premium_items = Item::newInstance()->listWhere(DB_TABLE_PREFIX.'t_item.fk_i_category_id NOT IN(' . $premium_categ_list . ')');
$premium_items DB_TABLE_PREFIX.'t_item.fk_i_category_id NOT IN ('$premium_categ_list ')';
View::newInstance()->_exportVariableToView('Premiums', array($premium_items));
//End
?>

But still not filtering the listings from selected categories...

So the question is what i'm doing wrong???? Can i made this work as i want????


Best Regards

*

MB Themes

This line does nothing
$premium_items = DB_TABLE_PREFIX.'t_item.fk_i_category_id NOT IN ('. $premium_categ_list . ')';

missing line to initiate search before exporting it...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jcarrolo01

  • *****
  • 256 posts
Thanks allot for your reply...


Best Regards