Page 2 of 50 FirstFirst 123412 ... LastLast
Results 11 to 20 of 494
  1. #11

    Default Re: Dynamic Filter 1.0 not working for Options

    I'll be uploading a new version in the next few days that addresses the no-space-allowed-in-option-names bug.

  2. #12
    Join Date
    Jan 2006
    Posts
    1,669
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Expand setting didn't work.

    However, I moved the filter to the bottom of my left column and it looks okay.

  3. #13

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    hmm, weird!
    I've uploaded version 1.1 now so that'll hopefully be available to download in a day or two.....provided I did everything right!

    Only 2 files changed in the new version as you'll see in the history section in the docs.

  4. #14
    Join Date
    May 2011
    Location
    DELHI,INDIA
    Posts
    44
    Plugin Contributions
    1

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    HI I HAVE INSTALLED DYNAMIC FILTER ON 1.39H , I AM GETTING THE FOLLOWING ERRORS ON CATEGORY PAGES 1054 Unknown column 'm.manufacturers_name' in 'field list'
    in:
    [SELECT DISTINCT m.manufacturers_name, p.products_image, pd.products_name, p.products_quantity, 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 FROM zen_products p LEFT JOIN zen_specials s on p.products_id = s.products_id LEFT JOIN zen_products_description pd on p.products_id = pd.products_id JOIN zen_products_to_categories p2c on p.products_id = p2c.products_id WHERE p.products_status = 1 and pd.language_id = '1' and p2c.categories_id = '5' GROUP BY p.products_id order by pd.products_name] HERE IS THE LINK http://www.molwa.com/index.php?main_page=index&cPath=5

  5. #15

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    First off, can you check you have uploaded or merged file 'template file overrides\includes\index_filters\YOUR_TEMPLATE\default_filter.php' correctly?
    Particularly look at the section between '// bof dynamic filter 2 of 2' and '// eof dynamic filter 2 of 2'

    If you're sure everything is ok, in file 'template file overrides\includes\index_filters\YOUR_TEMPLATE\default_filter.php' find the following section of code (it's the last of 4 similar sections of code that assign a value to $listing_sql)....
    Code:
    // 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" .
           " 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
    ...and add a join to the manufacturers table as shown here...

    Code:
    // 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
    ...hopefully that'll fix your problem.
    Can you let me know if it works for you?

  6. #16
    Join Date
    May 2011
    Location
    DELHI,INDIA
    Posts
    44
    Plugin Contributions
    1

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Sir you are great...your solution worked me, i am very much thankful to you, i promise once my site is operational i shall start making my financial contribution to zen cart as well as to you sir.. I am indebted

  7. #17
    Join Date
    Jan 2006
    Posts
    1,669
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    I'm looking hard at Cherry Zen template for first time. My original dynamic filter download really messed it up.

    I downloaded latest and it corrected most issues.

    One strange thing. When go to subcategory in DVD Movies/Action I lose the bottom half of my right column:

    http://www.prom-mart.com/demo-1/dvd-...on-c-3_10.html

    Which I now see is pushed down to bottom left of site.

    This seems to happen only in this category. Other categories/subcategories work okay:

    http://www.prom-mart.com/demo-1/hard...rds-c-1_4.html

    Thought it might be the Ultimate SEO URL for 1.5. Turned it off to test, still had problem.

    I'd probably use this live with it dedicated primarily to the right column, and if I sort it to the bottom it will work okay.

    I know that Cherry Zen template is a little sophisticated. But any thoughts why filter would mess-up on the one category/subcategory?

    Thanks.

    sph
    Last edited by SPH; 23 Apr 2012 at 07:54 PM.

  8. #18
    Join Date
    Jan 2006
    Posts
    1,669
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    I thought maybe it was skip one product categories; it wasn't. Now I see more categories/subcategories disrupting right column.

    This might be a template specific issue. Works okay on the free Abagon Red that I have this filer on; but not so with Cherry Zen (unless I perhaps sort filter to bottom.) Cherry Zen does have some complicated/advanced(?) styling issues, so maybe it's something with the column and center box widths.

    http://www.prom-mart.com/demo-1/

    sph
    www.prommart.com
    Last edited by SPH; 23 Apr 2012 at 09:47 PM.

  9. #19

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Looking at the code generated on the page that doesn't work, it looks like there is a rogue ul end tag followed by 2 rogue div end tags.
    This is what is being generated.....
    Code:
    <div class="dFilter">
    <p class="dFilterHeading">By Price:</p>
    <ul>
    <li class="dFilterLink"><input type="checkbox" name="fltPrice[]" value="29.49--39"  onclick=" this.form.submit();" />$29 -- $39</li>
    <li class="dFilterLink"><input type="checkbox" name="fltPrice[]" value="39.01--49"  onclick=" this.form.submit();" />$39 and over</li>
    </ul>
    </div>
    </div>
    </ul>
    </div>
    </div>
    It looks like it is being generated by the attribute section in file 'new files\includes\templates\YOUR_TEMPLATE\sideboxes\tpl_dynamic_filter.php'.
    Am I right in thinking you only get this layout problem on pages where there are no attributes shown? On the page that renders correctly, you have 'By Memory' and 'By Model' attributes as well as 'By Price'.
    Have you used the 'Exclude Options' setting in the Dynamic Filter config to suppress attributes on the faulty page?

  10. #20

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    SPH, try this amendment to 'new files\includes\templates\YOUR_TEMPLATE\sideboxes\tpl_dynamic_filter.php' around line 250.
    The lines you're adding are 'if ($attributes->RecordCount() > 0) {' and it's associated closing brace '}' near the end of the snippet.....
    Code:
    /********************************************start attribute link/check boxes***************************************************/
    
    	if(count($filteredProducts) > 0){
    		// Below line counts up all quantities of each item. e.g. if a glove is available in Small and Medium, quantity = 2.
    		//$attributes = $db->Execute("SELECT po.products_options_name, pov.products_options_values_name, count( p2as.quantity ) as quantity" .
    		$attributes = $db->Execute("SELECT count(DISTINCT p2a.products_id) as quantity, po.products_options_name, pov.products_options_values_name," .
    		 " SUM(IF(p2a.products_id IN(" . implode(',', $filteredProducts) . "), 1, 0)) as flag" .
    		 " FROM " . TABLE_PRODUCTS_ATTRIBUTES . " p2a ".
    		 " 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 p2a.products_id = p2as.products_id AND p2as.stock_attributes LIKE CONCAT('%', p2a.products_attributes_id, '%')" : "") .
    		 " WHERE p2a.products_id IN (" . implode(',', $unfilteredProducts) . ")" .
    		 (FILTER_OPTIONS_INCLUDE != '' ? " AND p2a.options_id IN (" . FILTER_OPTIONS_INCLUDE . ")" : '') .
    		 (FILTER_OPTIONS_EXCLUDE != '' ? " AND p2a.options_id NOT IN (" . FILTER_OPTIONS_EXCLUDE . ")" : '') .
    		 (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " AND p2as.quantity > 0" : "") .
    		 " GROUP BY po.products_options_name, pov.products_options_values_name" .
    		 " ORDER BY po.products_options_name, pov.products_options_values_sort_order");
    
    		if ($attributes->RecordCount() > 0) {
    		$savName = '';
    		$savValue = '';
    		while (!$attributes->EOF) {
    		// output if option name changes!!!
    			if ($attributes->fields['products_options_name'] != $savName) {
    				$options_array = array();
    				if ($savName != "") {
    					$content .= '<hr width="90%" size="0" />';
    					$content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . htmlspecialchars(html_entity_decode($savName, ENT_QUOTES)) . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
    					if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
    					if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
    					else $content .= '<ul' . ($attrCount > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
    					$content .= $filters;
    					if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '</select>';
    					else $content .= '</ul>';
    					if (FILTER_OPTIONS_STYLE == 'Expand' && $attrCount > FILTER_MAX_OPTIONS) $content .= '<a class="dFilterToggle" href="#">More' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', 'More', '', '', 'class="dFilterToggleImg"') . '</a>';
    					$content .= '</div></div>';
    				}
    
    				$group = DYNAMIC_FILTER_PREFIX . str_replace(' ', '', $attributes->fields['products_options_name']);
    				$resetParms[] = $group;
    				$parameters = zen_get_all_get_params();
    				$dropdownDefault = str_replace('%n', $attributes->fields['products_options_name'], DYNAMIC_FILTER_DROPDOWN_DEFAULT);
    				$filters = '';
    				$attrCount = 0;
    			}
    					
    			if ($attributes->fields['products_options_values_name'] != $savValue) {
    				if (isset($_GET[$group]) && in_array($attributes->fields['products_options_values_name'],$_GET[$group])) $linkClass = 'selected';
    				else if (isset($_GET[$group]) && array_filter($_GET[$group]) && !in_array($attributes->fields['products_options_values_name'],$_GET[$group]) || $attributes->fields['flag'] == 0) $linkClass = 'disabled';
    				//else if ($attributes->fields['flag'] == 0) $linkClass = 'disabled';
    				else $linkClass = 'enabled';
    				
    				$onClick = '';
    				if (FILTER_GOOGLE_TRACKING != 'No') $onClick .= $trackingStart . '\'filterAction\', \'' . ($linkClass != 'selected' ? 'addFilter' : 'removeFilter') . '\', \'' . $pageName . ';' . $attributes->fields['products_options_name'] . '=' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '\'' . $trackingEnd;
    				if (FILTER_STYLE == 'Checkbox - Single') $onClick .= ' this.form.submit();';
    
    				if (FILTER_METHOD != 'Hidden' || $linkClass != 'disabled') {
    					$hrefLink = $group . '[]=' . rawurlencode($attributes->fields['products_options_values_name']);
    					switch(strtok(FILTER_STYLE, " ")) {
    					case 'Checkbox':
    						$filters .= '<li class="dFilterLink">' . zen_draw_checkbox_field($group . '[]', $attributes->fields['products_options_values_name'], (isset($_GET[$group]) && in_array($attributes->fields['products_options_values_name'],$_GET[$group]) ? true : false), ($linkClass == 'disabled' ? 'disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Checkbox - Single' ? ' onclick="' . $onClick . '"' : '')) . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '</li>';
    						break;
    					case 'Link':
    						$filters .= '<li class="dFilterLink"><a class="' . $linkClass . '"' . ($linkClass != 'disabled' ? ' rel="nofollow" href="' . zen_href_link($_GET['main_page'], ($linkClass != 'selected' ? $parameters . $hrefLink : str_replace(array($hrefLink,'&'.$hrefLink), array("",""), $parameters)), 'NONSSL') . '"' . ($onClick != '' ? ' onclick="' . $onClick . '"' : '') : '') . ' >' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '</a></li>';
    						break;
    					case 'Dropdown':
    						$filters .= '<option value="' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '"' . ($linkClass == 'selected' ? ' selected="selected"' : '') . ($linkClass == 'disabled' ? ' disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Dropdown - Single' ? ' onclick="' . $onClick . '"' : '') . ' >' .  $attributes->fields['products_options_values_name'] . '</option>';
    						break;
    					}
    				++$attrCount;
    				}
    			}
    			$savValue = $attributes->fields['products_options_values_name'];
    			$savName = $attributes->fields['products_options_name'];
    		$attributes->MoveNext();
    		}
    		if ($savName != "") {
    			$content .= '<hr width="90%" size="0" />';
    			$content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . htmlspecialchars(html_entity_decode($savName, ENT_QUOTES)) . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
    			if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
    			if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
    			else $content .= '<ul' . ($attrCount > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
    			$content .= $filters;
    		}
    		if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '</select>';
    		else $content .= '</ul>';
    		if (FILTER_OPTIONS_STYLE == 'Expand' && $attrCount > FILTER_MAX_OPTIONS) $content .= '<a class="dFilterToggle" href="#">More' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', 'More', '', '', 'class="dFilterToggleImg"') . '</a>';
    		$content .= '</div></div>';
    		}
    	}
    
    /********************************************end attribute link/check boxes***************************************************/
    Can you let me know if it works for you?

 

 
Page 2 of 50 FirstFirst 123412 ... LastLast

Similar Threads

  1. 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
  •