Page 3 of 81 FirstFirst 123451353 ... LastLast
Results 21 to 30 of 808
  1. #21
    Join Date
    Jan 2006
    Posts
    1,542
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    I couldn't figure out how to Exclude Options, but your patch seems to have worked!

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

    Thanks!

    sph

    PS: Should this thread by your official support thread for this mod?
    Last edited by SPH; 24 Apr 2012 at 11:54 PM.

  2. #22
    Join Date
    Jan 2006
    Posts
    1,542
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Damian,

    Your Dynamic Filter is even better/more powerful than I originally thought. It can also sort by Features, so everything does not have to be a selectable attribute.

    http://www.prom-mart.com/demo-1/sale...0-c-50_46.html

    After six years, there is still alot I can learn about zencart.

  3. #23
    Join Date
    Mar 2008
    Posts
    30
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    This is a great mod. I do have 1 problem. I'm building a store that will sell big/tall mens clothing. I wanted a filter to mainly filter by size. So I added size as one of the attributes. I went to shirts and I wanted to filter out everything but a 7X size. It didn't filter. It still showed all the shirts in the catagory after I chose 7X. I sure hope I can get this working. Any help would be much appreciated. I am using version 1.5

    Thanks

  4. #24
    Join Date
    Mar 2008
    Posts
    30
    Plugin Contributions
    0

    Default Re: Dynamic Filter 1.0 not working for Options

    This is a great mod. I do have 1 problem. I'm building a store that will sell big/tall mens clothing. I wanted a filter to mainly filter by size. So I added size as one of the attributes. I went to shirts and I wanted to filter out everything but a 7X size. It didn't filter. It still showed all the shirts in the category after I chose 7X. I sure hope I can get this working. Any help would be much appreciated. I am using version 1.5

    P.S. I did reply to another thread regarding Dynamic Filter 1.0, didn't know there was another thread about the filters not working. Sorry for the multiple posts.

  5. #25
    Join Date
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Re: Dynamic Filter 1.0 not working for Options

    Did you download the latest version that came just this past week?

  6. #26
    Join Date
    Mar 2008
    Posts
    30
    Plugin Contributions
    0

    Default Re: Dynamic Filter 1.0 not working for Options

    Quote Originally Posted by Daviator View Post
    Did you download the latest version that came just this past week?
    Yes, I just downloaded it a couple days ago. It's the newest, latest version. Just can't get it to filter. I tried it on shits with the larger sizes (7X+) and it doesn't filter anything.

  7. #27
    Join Date
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Re: Dynamic Filter 1.0 not working for Options

    Can I get the URL to you site? (I'm a beginner too but a second set of eyes couldn't hurt)

  8. #28
    Join Date
    Mar 2008
    Posts
    30
    Plugin Contributions
    0

    Default Re: Dynamic Filter 1.0 not working for Options

    Quote Originally Posted by Daviator View Post
    Can I get the URL to you site? (I'm a beginner too but a second set of eyes couldn't hurt)
    http://www.bigandtallwarehouse.com (I have to turn it on, it's set for off (maintenance) )

  9. #29
    Join Date
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Re: Dynamic Filter 1.0 not working for Options

    can you turn on please?

  10. #30
    Join Date
    Apr 2012
    Posts
    3
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Quote Originally Posted by damiantaylor View Post
    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?
    Im having the exact same problem the sideboxes after the dynamic filter box are mis aligned but when I add those lines to the end of the snippet the pages with dynamic pages sidebox fails to load,

    what am I doing wrong?

 

 
Page 3 of 81 FirstFirst 123451353 ... 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