Page 58 of 81 FirstFirst ... 848565758596068 ... LastLast
Results 571 to 580 of 808
  1. #571
    Join Date
    Mar 2015
    Posts
    105
    Plugin Contributions
    0

    Default Re: Dynamic Filter - filter does not work on product listing

    I'm sorry for having another question this quick

    I have some files te changes but I don't know how to, because i have not enough experience.

    For example this one:
    Featured products header
    PHP Code:
    [PHP]<?php
    /**
     * Featured Products
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 6912 2007-09-02 02:23:45Z drbyte $
     */
    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    // display order dropdown
    $disp_order_default PRODUCT_FEATURED_LIST_SORT_DEFAULT;

    require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));

    $featured_products_array = array();

    // bof dynamic filter 1 of 1
    include(DIR_WS_MODULES zen_get_module_directory(FILENAME_DYNAMIC_FILTER));

    $listing_sql "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, 
                      p.products_model, p.products_quantity, p.products_weight, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status, p.master_categories_id, m.manufacturers_id"
    ;

    $listing_sql .= " FROM " TABLE_PRODUCTS " p LEFT JOIN " TABLE_MANUFACTURERS " m on p.manufacturers_id = m.manufacturers_id" .
                   
    " LEFT JOIN " TABLE_FEATURED " f on p.products_id = f.products_id" .
                   
    " LEFT JOIN " TABLE_PRODUCTS_TO_CATEGORIES " p2c on p.products_id = p2c.products_id" .
                   
    " LEFT JOIN " TABLE_PRODUCTS_DESCRIPTION " pd on p.products_id = pd.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 f.status = 1 and pd.language_id = :languagesID " .
    $filter " GROUP BY p.products_id " $having $order_by;
    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
    $featured_products_split = new splitPageResults($listing_sqlMAX_DISPLAY_PRODUCTS_FEATURED_PRODUCTS);
    // eof dynamic filter 1 of 1

    //check to see if we are in normal mode ... not showcase, not maintenance, etc
    $show_submit zen_run_normal();

    // check whether to use multiple-add-to-cart, and whether top or bottom buttons are displayed
    if (PRODUCT_FEATURED_LISTING_MULTIPLE_ADD_TO_CART and $show_submit == true and $featured_products_split->number_of_rows 0) {

      
    // check how many rows
      
    $check_products_all $db->Execute($featured_products_split->sql_query);
      
    $how_many 0;
      while (!
    $check_products_all->EOF) {
        if (
    zen_has_product_attributes($check_products_all->fields['products_id'])) {
        } else {
          
    // needs a better check v1.3.1
          
    if ($check_products_all->fields['products_qty_box_status'] != 0) {
            if (
    zen_get_products_allow_add_to_cart($check_products_all->fields['products_id']) !='N') {
              if (
    $check_products_all->fields['product_is_call'] == 0) {
                if ((
    SHOW_PRODUCTS_SOLD_OUT_IMAGE == and $check_products_all->fields['products_quantity'] > 0) or SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) {
                  if (
    $check_products_all->fields['products_type'] != 3) {
                    if (
    zen_has_product_attributes($check_products_all->fields['products_id']) < 1) {
                      
    $how_many++;
                    }
                  }
                }
              }
            }
          }
        }
        
    $check_products_all->MoveNext();
      }

      if ( ((
    $how_many and $show_submit == true and $featured_products_split->number_of_rows 0) and (PRODUCT_FEATURED_LISTING_MULTIPLE_ADD_TO_CART == or  PRODUCT_FEATURED_LISTING_MULTIPLE_ADD_TO_CART == 3)) ) {
        
    $show_top_submit_button true;
      } else {
        
    $show_top_submit_button false;
      }
      if ( ((
    $how_many and $show_submit == true and $featured_products_split->number_of_rows 0) and (PRODUCT_FEATURED_LISTING_MULTIPLE_ADD_TO_CART >= 2)) ) {
        
    $show_bottom_submit_button true;
      } else {
        
    $show_bottom_submit_button false;
      }
    }
    ?>
    [/PHP]

    Has to go into this one (my file)
    PHP Code:
    <?php
    /**Single Listing Template mod v1.8
     * Featured Products header_php.php
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 6912 2007-09-02 02:23:45Z drbyte $
     */
    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    // display order dropdown
    $disp_order_default PRODUCT_FEATURED_LIST_SORT_DEFAULT;

    require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));

    $featured_products_array = array();

    $listing_sql "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
                                      p.product_is_always_free_shipping, p.products_qty_box_status,
                                      p.master_categories_id, m.manufacturers_id
                                      FROM (" 
    TABLE_PRODUCTS " p
                                      LEFT JOIN " 
    TABLE_MANUFACTURERS " m on (p.manufacturers_id = m.manufacturers_id), " .
    TABLE_PRODUCTS_DESCRIPTION " pd
                                      LEFT JOIN " 
    TABLE_FEATURED " f on pd.products_id = f.products_id )
                                      WHERE p.products_status = 1 and p.products_id = f.products_id and f.status = 1
                                      AND p.products_id = pd.products_id and pd.language_id = :languagesID " 
    .
    $order_by;

    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
    $featured_products_split = new splitPageResults($featured_products_query_rawMAX_DISPLAY_PRODUCTS_FEATURED_PRODUCTS);

    //check to see if we are in normal mode ... not showcase, not maintenance, etc
      
    $show_submit zen_run_normal();

    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
      
    'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
      
    'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
      
    'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
      
    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
      
    'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
      
    'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

      
    /*                         ,
      'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
      */
      
    asort($define_list);
      
    reset($define_list);
      
    $column_list = array();
      foreach (
    $define_list as $key => $value)
      {
        if (
    $value 0$column_list[] = $key;
      }
    ?>
    I see where bof 1 of 1 begins and ends, but because my file looks so differend i really don't know wich is wich and what i should replace.
    I don't want to break anything offcorse. It's just that I never build websites and therefor can not read the code
    Language: Dutch
    English: not so very good
    Allready have a live shop, so building local/on my computer

  2. #572
    Join Date
    Mar 2015
    Posts
    105
    Plugin Contributions
    0

    Default Re: Dynamic Filter - filter does not work on product listing

    Seeing the files in color in my post above, made it easyer for me to see what i am doing. SO i tryed to change the 4 files i still needed to do and then installed the sql.

    It did not work, had to use the second one given by design in this thread.

    Then i turned on the dynamic filter in the layout contole and there it is, BUT
    I now see brand, color and name, but i swear i just saw a lot more before i refreshed the page. Am I going crazy or....
    Am I doing something wrong? (i don't have a readme so i don't know)
    Language: Dutch
    English: not so very good
    Allready have a live shop, so building local/on my computer

  3. #573
    Join Date
    Mar 2015
    Posts
    105
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    I need a little help again

    For the westminster new template I had to install this file:
    includes/modules/pages/specials/header.php
    I know have to change is for the dynamic filter to work.
    But because the code is so very different, i don't know how to do that.

    This is the westminster specials header
    PHP Code:
    <?php
    /** Single Listing template mod v1.8
     * Specials header_php.php
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 3000 2006-02-09 21:11:37Z wilt $
     */

    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    //lines25-71 moved to main_template_vars
    //bof Single Listing Template
    if (MAX_DISPLAY_SPECIAL_PRODUCTS ) {
        
    $disp_order_default PRODUCT_ALL_LIST_SORT_DEFAULT;
        require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));
        
    $order_by = isset($order_by) ? $order_by 'ORDER BY s.specials_date_added DESC';
        if (
    MAX_DISPLAY_SPECIAL_PRODUCTS ) {
                
    $listing_sql "SELECT p.products_id, p.products_image, pd.products_name,
                              p.master_categories_id, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight
                             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))
                             WHERE p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1'
                             AND s.status = 1
                             AND pd.language_id = :languagesID
                             ORDER BY s.specials_date_added DESC"
    ;

            
    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
            
    //check to see if we are in normal mode ... not showcase, not maintenance, etc
            
    $show_submit zen_run_normal();

            
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
            
    'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
            
    'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
            
    'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
            
    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
            
    'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
            
    'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

            
    /*                         ,
            'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
            */
            
    asort($define_list);
            
    reset($define_list);
            
    $column_list = array();
            foreach (
    $define_list as $key => $value)
            {
                if (
    $value 0$column_list[] = $key;
            }
        }
    }
    //eof Single Listing Template
    ?>
    And this is the specials file with a BOF I have to put in the westminster specials header file
    PHP Code:
    <?php
    /**
     * Specials
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 3000 2006-02-09 21:11:37Z wilt $
     */

    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);

    // bof dynamic filter 1 of 1
    if (MAX_DISPLAY_SPECIAL_PRODUCTS ) {
      include(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_DYNAMIC_FILTER));

      
    $listing_sql "SELECT DISTINCT p.products_id, p.products_image, pd.products_name, p.master_categories_id, p.manufacturers_id";

      
    $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" .
        
    " LEFT 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 s.status = 1" .
        
    " AND pd.language_id = :languagesID" $filter " GROUP BY p.products_id " $having 'ORDER BY s.specials_date_added DESC';

      
    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
      
    $specials_split = new splitPageResults($listing_sqlMAX_DISPLAY_SPECIAL_PRODUCTS);
    }
    // eof dynamic filter 1 of 1 
    ?>
    Can someone help me with this? I have everything working fine, except for this file so now I get a blanc page on the specials.

  4. #574
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Dynamic Filter [Support Thread]

    Quote Originally Posted by Pompidompie View Post
    I need a little help again

    For the westminster new template I had to install this file:
    includes/modules/pages/specials/header.php
    I know have to change is for the dynamic filter to work.
    But because the code is so very different, i don't know how to do that.

    This is the westminster specials header
    PHP Code:
    <?php
    /** Single Listing template mod v1.8
     * Specials header_php.php
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 3000 2006-02-09 21:11:37Z wilt $
     */

    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    //lines25-71 moved to main_template_vars
    //bof Single Listing Template
    if (MAX_DISPLAY_SPECIAL_PRODUCTS ) {
        
    $disp_order_default PRODUCT_ALL_LIST_SORT_DEFAULT;
        require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));
        
    $order_by = isset($order_by) ? $order_by 'ORDER BY s.specials_date_added DESC';
        if (
    MAX_DISPLAY_SPECIAL_PRODUCTS ) {
                
    $listing_sql "SELECT p.products_id, p.products_image, pd.products_name,
                              p.master_categories_id, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight
                             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))
                             WHERE p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1'
                             AND s.status = 1
                             AND pd.language_id = :languagesID
                             ORDER BY s.specials_date_added DESC"
    ;

            
    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
            
    //check to see if we are in normal mode ... not showcase, not maintenance, etc
            
    $show_submit zen_run_normal();

            
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
            
    'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
            
    'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
            
    'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
            
    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
            
    'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
            
    'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

            
    /*                         ,
            'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
            */
            
    asort($define_list);
            
    reset($define_list);
            
    $column_list = array();
            foreach (
    $define_list as $key => $value)
            {
                if (
    $value 0$column_list[] = $key;
            }
        }
    }
    //eof Single Listing Template
    ?>
    And this is the specials file with a BOF I have to put in the westminster specials header file
    PHP Code:
    <?php
    /**
     * Specials
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 3000 2006-02-09 21:11:37Z wilt $
     */

    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);

    // bof dynamic filter 1 of 1
    if (MAX_DISPLAY_SPECIAL_PRODUCTS ) {
      include(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_DYNAMIC_FILTER));

      
    $listing_sql "SELECT DISTINCT p.products_id, p.products_image, pd.products_name, p.master_categories_id, p.manufacturers_id";

      
    $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" .
        
    " LEFT 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 s.status = 1" .
        
    " AND pd.language_id = :languagesID" $filter " GROUP BY p.products_id " $having 'ORDER BY s.specials_date_added DESC';

      
    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
      
    $specials_split = new splitPageResults($listing_sqlMAX_DISPLAY_SPECIAL_PRODUCTS);
    }
    // eof dynamic filter 1 of 1 
    ?>
    Can someone help me with this? I have everything working fine, except for this file so now I get a blanc page on the specials.
    I have not tested it, but i think the code below will work
    PHP Code:
     <?php
    /** Single Listing template mod v1.8
     * Specials header_php.php
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 3000 2006-02-09 21:11:37Z wilt $
     */

    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    //lines25-71 moved to main_template_vars
    //bof Single Listing Template
    // bof dynamic filter 1 of 1
    if (MAX_DISPLAY_SPECIAL_PRODUCTS ) {
      include(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_DYNAMIC_FILTER));
        
    $disp_order_default PRODUCT_ALL_LIST_SORT_DEFAULT;
        require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));
        
    $order_by = isset($order_by) ? $order_by 'ORDER BY s.specials_date_added DESC';
        if (
    MAX_DISPLAY_SPECIAL_PRODUCTS ) {
                
    $listing_sql "SELECT p.products_id, p.products_image, pd.products_name,
                              p.master_categories_id, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight
                             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
                             LEFT 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 " "") : '') . "
                             WHERE p.products_id = s.products_id
                             AND p.products_id = pd.products_id
                             AND p.products_status = '1'
                             AND s.status = 1
                             AND pd.language_id = :languagesID " 

                             
    $filter "
                             GROUP BY p.products_id " 

                             
    $having "
                             ORDER BY s.specials_date_added DESC"
    ;

            
    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
            
    //check to see if we are in normal mode ... not showcase, not maintenance, etc
            
    $show_submit zen_run_normal();

            
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
            
    'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
            
    'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
            
    'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
            
    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
            
    'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
            
    'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

            
    /*                         ,
            'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
            */
            
    asort($define_list);
            
    reset($define_list);
            
    $column_list = array();
            foreach (
    $define_list as $key => $value)
            {
                if (
    $value 0$column_list[] = $key;
            }
        }
    }
    //eof Single Listing Template
    ?>

  5. #575
    Join Date
    Mar 2015
    Posts
    105
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    Thank you Design.
    Before, I got a blanc page witj absolutely nothing.
    Now I see my webshop-the specials page again, but WARNING: An Error occurred, please refresh the page and try again.

    When looking in the logs it says:
    [10-Apr-2015 10:41:34 Europe/Berlin] PHP Warning: mysqli_query(): Empty query in C:\xampp\htdocs\zencart\includes\classes\db\mysql\query_factory.php on line 43

    [10-Apr-2015 10:41:34 Europe/Berlin] PHP Fatal error: 0: :: ==> (as called by) C:\xampp\htdocs\zencart\includes\modules\pages\specials\main_template_vars.php on line 29 <== in C:\xampp\htdocs\zencart\includes\classes\db\mysql\query_factory.php on line 155
    Language: Dutch
    English: not so very good
    Allready have a live shop, so building local/on my computer

  6. #576
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Dynamic Filter [Support Thread]

    Quote Originally Posted by Pompidompie View Post
    Thank you Design.
    Before, I got a blanc page witj absolutely nothing.
    Now I see my webshop-the specials page again, but WARNING: An Error occurred, please refresh the page and try again.

    When looking in the logs it says:
    [10-Apr-2015 10:41:34 Europe/Berlin] PHP Warning: mysqli_query(): Empty query in C:\xampp\htdocs\zencart\includes\classes\db\mysql\query_factory.php on line 43

    [10-Apr-2015 10:41:34 Europe/Berlin] PHP Fatal error: 0: :: ==> (as called by) C:\xampp\htdocs\zencart\includes\modules\pages\specials\main_template_vars.php on line 29 <== in C:\xampp\htdocs\zencart\includes\classes\db\mysql\query_factory.php on line 155
    And if you replace the code from the earlier post with this one??

    PHP Code:
     <?php
    /** Single Listing template mod v1.8
     * Specials header_php.php
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 3000 2006-02-09 21:11:37Z wilt $
     */

    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    //lines25-71 moved to main_template_vars
    //bof Single Listing Template
    // bof dynamic filter 1 of 1
    if (MAX_DISPLAY_SPECIAL_PRODUCTS ) {
      include(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_DYNAMIC_FILTER));
        
    $disp_order_default PRODUCT_ALL_LIST_SORT_DEFAULT;
        require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));
        
    $order_by = isset($order_by) ? $order_by 'ORDER BY s.specials_date_added DESC';
        if (
    MAX_DISPLAY_SPECIAL_PRODUCTS ) {
                
    $listing_sql "SELECT p.products_id, p.products_image, pd.products_name,
                              p.master_categories_id, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight
                             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
                             LEFT 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 " "") : '') . "
                             WHERE p.products_id = s.products_id
                             AND p.products_id = pd.products_id
                             AND p.products_status = '1'
                             AND s.status = 1
                             AND pd.language_id = :languagesID " 

                             
    $filter "
                             GROUP BY p.products_id " 

                             
    $having "
                             ORDER BY s.specials_date_added DESC"
    ;

            
    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
            
    $specials_split = new splitPageResults($listing_sqlMAX_DISPLAY_SPECIAL_PRODUCTS);
            
    //check to see if we are in normal mode ... not showcase, not maintenance, etc
            
    $show_submit zen_run_normal();

            
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
            
    'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
            
    'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
            
    'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
            
    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
            
    'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
            
    'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

            
    /*                         ,
            'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
            */
            
    asort($define_list);
            
    reset($define_list);
            
    $column_list = array();
            foreach (
    $define_list as $key => $value)
            {
                if (
    $value 0$column_list[] = $key;
            }
        }
    }
    //eof Single Listing Template
    ?>

  7. #577
    Join Date
    Mar 2015
    Posts
    105
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    My first language is Dutch.
    I see my website, I see the specials page, I see the breadcrums, but nothing below, the warning message is also gone.

    But

    The second language is English and there, when i click on the specials page, I get a blanc page again.

    Logs:
    [10-Apr-2015 11:00:54 Europe/Berlin] PHP Parse error: syntax error, unexpected 't' (T_STRING) in C:\xampp\htdocs\zencart\includes\languages\english\specials.php on line 24
    Language: Dutch
    English: not so very good
    Allready have a live shop, so building local/on my computer

  8. #578
    Join Date
    Mar 2015
    Posts
    105
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    I have removed a line from the languages file that should not be there and tatatatata at a first look everything works again.
    Offcorse I still have to test it, to see that there is not still something wrong somewhere, but he, its a start.
    Thank you so much Design!
    Language: Dutch
    English: not so very good
    Allready have a live shop, so building local/on my computer

  9. #579
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Dynamic Filter [Support Thread]

    Quote Originally Posted by Pompidompie View Post
    My first language is Dutch.
    I see my website, I see the specials page, I see the breadcrums, but nothing below, the warning message is also gone.

    But

    The second language is English and there, when i click on the specials page, I get a blanc page again.

    Logs:
    [10-Apr-2015 11:00:54 Europe/Berlin] PHP Parse error: syntax error, unexpected 't' (T_STRING) in C:\xampp\htdocs\zencart\includes\languages\english\specials.php on line 24
    That is not an isssue with the module, but you probably edited that fale and mad an error. Paste the contents and I'll take a look

  10. #580
    Join Date
    Mar 2015
    Posts
    105
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    Yes your right. I had the problem that whem featured products is empty it shows TEXT_NO_PRODUCTS instead off the text sorry no products here (or something) So i fixed that with adding a define TEXT_NO_PRODUCTS to the featured products and specials languages files.
    Its was fixing that problem, but then it made a new problem with giving me blanc pages after installing the dynamic filter.
    So.... now I removed the Define TEXT_NO_PRODUCTS lines from the featured products and specials languages files. Solved my dynamic filter blanc page problem with that, but it gave me back the problem that the text TEXT_NO_PRODUCTS is showing again.

    Keeps me busy
    Language: Dutch
    English: not so very good
    Allready have a live shop, so building local/on my computer

 

 
Page 58 of 81 FirstFirst ... 848565758596068 ... LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR