Results 1 to 10 of 809

Threaded View

  1. #11
    Join Date
    Jan 2015
    Posts
    726
    Plugin Contributions
    1

    Default Re: Dynamic Filter - Read only products

    Zencart 1.5.4
    Zen-Cart_Dynamic_Attribute_filter-1.3

    I was getting an error on my sql file. I used the code below found in the thread to make Dynamic filters SQL file work

    // We show them all
    $listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id,
    p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1,
    s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price,
    p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping,
    p.products_qty_box_status";

    $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
    " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
    " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
    " LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
    " JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
    ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
    (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

    $listing_sql .= " WHERE p.products_status = 1
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = '" . (int)$current_category_id . "'" .
    $filter .
    " GROUP BY p.products_id " .
    $having .
    $alpha_sort;
    }
    }
    // eof dynamic filter 2 of 2

    Now I have an error when I do a search. I need assistance with solving this error below if someone could assist me...

    [03-Dec-2016 14:51:00 America/New_York] PHP Fatal error: 1054:Unknown column 'in_name' in 'order clause' :: SELECT p.products_id, p.products_price_sorter, p.master_categories_id, p.manufacturers_id FROM products p LEFT JOIN manufacturers m USING(manufacturers_id) LEFT JOIN products_description pd on p.products_id = pd.products_id JOIN products_to_categories p2c on p.products_id = p2c.products_id JOIN categories c on p2c.categories_id = c.categories_id LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE (p.products_status = 1
    AND pd.language_id = 1 AND ((pd.products_name LIKE '%aims%'
    OR p.products_model
    LIKE '%aims%'
    OR m.manufacturers_name
    LIKE '%aims%' OR (mtpd.metatags_keywords
    LIKE '%aims%'
    AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description
    LIKE '%aims%'
    AND mtpd.metatags_description !='') OR pd.products_description
    LIKE '%aims%') and (pd.products_name LIKE '%power%'
    OR p.products_model
    LIKE '%power%'
    OR m.manufacturers_name
    LIKE '%power%' OR (mtpd.metatags_keywords
    LIKE '%power%'
    AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description
    LIKE '%power%'
    AND mtpd.metatags_description !='') OR pd.products_description
    LIKE '%power%') )) GROUP BY p.products_id order by in_name DESC, p.products_sort_order, pd.products_name ==> (as called by) C:\xampp\htdocs\xxx.com\includes\templates\theme871\sideboxes\tpl_dynamic_filter .php on line 63 <== in C:\xampp\htdocs\xxx.com\includes\classes\db\mysql\query_factory.php on line 292
    Last edited by chadlly2003; 3 Dec 2016 at 09:11 PM.

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. Empty Dynamic Filter
    By LadyoftheCave in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 6 Jun 2016, 12:47 PM
  3. v150 Dynamic filter
    By Dinoleix in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 13 Aug 2013, 10:23 AM
  4. v150 Dynamic filter - All pages
    By Okkwebmedia in forum Addon Sideboxes
    Replies: 0
    Last Post: 8 Jul 2013, 08:52 AM
  5. v138a Dynamic Filter
    By SoftCorpse in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 18 Jun 2012, 01:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg