Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Problems
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 7th, 2012, 06:55 AM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default Need Same Price Filter Functionality for my new site like my prev I have

HI Eric,

I wanna achive price filter functionality for my another site : laptopsisland.com exactly as : cosmeticsshoppingmall.com .. (it uses some component , but for this site I wanna get same functionaly but with default code.. I mean I wont use any component instead i just below code )


Below is the default code of laptopsisland.com: PLEASE TWEAK BELOW DEFAULT CODE TO ACHIEVE MY FUNCTIONALTY, since Iam not gonna use that componnet in this site...
Price Filter --> Module Template
Code:
<ul>
  <li><a href="[server.url type='fullpage' query='price=-50']">Less than 50</a></li>
  <li><a href="[server.url type='fullpage' query='price=50-100']">50 ~ 100</a></li>
  <li><a href="[server.url type='fullpage' query='price=100-150']">100 ~ 150</a></li>
  <li><a href="[server.url type='fullpage' query='price=150-']">More than 150</a></li>
<ul>



Below is the code I used for cosmeticsshoppingmall.com

widgets --> tools/accessories price filter:
Code:
<form method="get">
  
  <div  style="color: #FD0320;" >
    
  <div id="tools-accessories" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all"></div><br/><br/>
  
    <div class="priceFilterText">  $<input type="text" size="4" id="minprice"> -   $<input type="text" size="4" id="maxprice" > 
      
      
      <?php if (@$_GET['brand']){ echo '<input type="hidden" name="brand" value="'.strip_tags($_GET['brand']).'" />'; } ; ?> 
<?php if (@$_GET['word']){ echo '<input type="hidden" name="word" value="'.strip_tags($_GET['word']).'" />'; } ; ?> 
<?php if (@$_GET['ppp']){ echo '<input type="hidden" name="ppp" value="'.strip_tags($_GET['ppp']).'" />'; } ; ?>  
<?php if (@$_GET['sort']){ echo '<input type="hidden" name="sort" value="'.strip_tags($_GET['sort']).'" />'; } ; ?>
  <?php if (@$_GET['price']){ echo '<input type="hidden" name="price" value="'.strip_tags($_GET['price']).'" />'; } ; ?>     
  
    
  <input type="hidden" name="price"  id="pricego">  
  
     <input type="hidden" name="sort" value="price" />
      
  &nbsp&nbsp <input type="submit" value="GO" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" aria-disabled="false">
  
  </div>
</div>
</form>


 <?php if (@$_GET['price']) { ?>

<ul>
  <li><a href="[server.url type='fullpage' query='-sort&-price']"><FONT COLOR="red"><?php echo"[[X] Remove Price "; ?><?php echo @$_GET['price']; ?></font></a></li>
</ul>

<?php } ?>

Category --> Default --> Module Template (just filter code displaying):
Code:
<!-- Sorting By Users -->
<div class="dffltrs">
  <form method="get">
    
    <?php if (@$_GET['brand']){ echo '<input type="hidden" name="brand" value="'.strip_tags($_GET['brand']).'" />'; } ; ?> 
<?php if (@$_GET['price']){ echo '<input type="hidden" name="price" value="'.strip_tags($_GET['price']).'" />'; } ; ?> 
<?php if (@$_GET['word']){ echo '<input type="hidden" name="word" value="'.strip_tags($_GET['word']).'" />'; } ; ?>
<?php if (@$_GET['ppp']){ echo '<input type="hidden" name="ppp" value="'.strip_tags($_GET['ppp']).'" />'; } ; ?> 
<?php if (@$_GET['sort']){ echo '<input type="hidden" name="sort" value="'.strip_tags($_GET['sort']).'" />'; } ; ?>
    
    
    <span class="dflside">
      Products per page:
      <?php echo datafeedr_tools()->form_select("ppp",
        array(
        "12" => "12",
        "24" => "24",
        "36" => "36",
        "48" => "48",
        )); ?>
    </span>
    <span class="dfrside">
      Sort by:
      <?php echo datafeedr_tools()->form_select("sort",
        array(
        "price"   => "Price (low to high)",
        "-price"   => "Price (high to low)",
        "name"     => "Product Name (a - z)",
        "-name"   => "Product Name (z - a)",
        )); ?>
      <input type="submit" value="Go" class="dfsbmt" />
    </span>
    <div class="clearingdiv">&nbsp;</div>
  </form>
</div>

Last edited by johngibb123 : November 7th, 2012 at 06:57 AM.
  #2  
Old November 7th, 2012, 08:10 AM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

I given codes of cosmeticsshoppingmall.com just for your reference... iam unable to make same functionality for the defaut brand filter code.

so please get me same functionality for the default code as welll...


Thanks!
  #3  
Old November 7th, 2012, 01:57 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I really don't know what you want to do. Can you please clarify your question. It does not make sense to me.

Eric
  #4  
Old November 7th, 2012, 02:32 PM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

ok... What iam trying to ask is:

I need a dynamic Price filter code using below code:

Quote:
<ul>
<li><a href="[server.url type='fullpage' query='price=-50']">Less than 50</a></li>
<li><a href="[server.url type='fullpage' query='price=50-100']">50 ~ 100</a></li>
<li><a href="[server.url type='fullpage' query='price=100-150']">100 ~ 150</a></li>
<li><a href="[server.url type='fullpage' query='price=150-']">More than 150</a></li>
<ul>


please tweak for me above code... Assume i selected a price filter, and then later I click 'sort by: low to high', in this case whatever the price i selected it shud be there until I close that selected filter...

In another case, I clicked price filter, then a brand filter,, so selected price filter shudnt disappear unless i close that filter myself...

please check references this and this , i already asked those scenarios before only BUT at that time I used Jquery Slider component for price filter, which Iam not using it for now.. so thats why iam requesting to have a code that fulfills all scenarios using above code..

sorry if iam confused you...
  #5  
Old November 7th, 2012, 04:37 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I do not have a solution for a dynamic price filter. Price filters are static.

Eric
  #6  
Old November 7th, 2012, 04:44 PM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

Quote:
Originally Posted by Eric View Post
Hi,

I do not have a solution for a dynamic price filter. Price filters are static.

Eric
Eric,

iam sorry iam reallly not actually asking dynamic... I put static values only, BUT i want that same functionality mentioned above.. (I mentioned some scenarious above.. pls provide me a code according to those scenarious..) Yo already given code for this functionality but for jquery slider component, not for this..


pls try to understand what iam trying to ask for.. iam really not understanding how to explain in a correct way..

Last edited by johngibb123 : November 7th, 2012 at 04:46 PM.
  #7  
Old November 7th, 2012, 04:52 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by johngibb123 View Post
please tweak for me above code... Assume i selected a price filter, and then later I click 'sort by: low to high', in this case whatever the price i selected it shud be there until I close that selected filter...
That's already working for me on your site.

Maybe you mean this:
HTML Code:
<ul>
<?php if (@$_GET['price']) { ?>

  <li><a href="[server.url type='fullpage' query='-price']">[X] Remove price filter</a></li>

<?php } else { ?>

  <li><a href="[server.url type='fullpage' query='price=-150']">Less than 150</a></li>
  <li><a href="[server.url type='fullpage' query='price=150-300']">150 ~ 300</a></li>
  <li><a href="[server.url type='fullpage' query='price=300-550']">300 ~ 550</a></li>
  <li><a href="[server.url type='fullpage' query='price=550-']">More than 550</a></li>

<?php } ?>
</ul>
  #8  
Old November 7th, 2012, 05:27 PM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

Does above code works if I select to brand filter after selecting price filter?
  #9  
Old November 7th, 2012, 10:18 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Your brand filter does not work. I suggest you use this method: http://www.datafeedr.com/forums/showthread.php?t=6778
  #10  
Old November 8th, 2012, 02:09 AM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

select price filter and then select brand filter, now selected price filter gone!

pls chk here: here is my code for brand filter:

Quote:
<ul>

<li><a href="[server.url type='fullpage' query='price=-150']">Less than 150</a></li>
<li><a href="[server.url type='fullpage' query='price=150-300']">150 ~ 300</a></li>
<li><a href="[server.url type='fullpage' query='price=300-550']">300 ~ 550</a></li>
<li><a href="[server.url type='fullpage' query='price=550-']">More than 550</a></li>


<?php if (@$_GET['price']) { ?>

<li><a href="[server.url type='fullpage' query='-price']">[X] Remove price filter</a></li>

<?php } ?>

</ul>

and also pls tell me how can I make use same brand filter for all of my catgeories.. right now iam using:
Quote:
var url = "http://laptopsisland.com/shop/c/laptops/";
u can refer this thread, if needed:

Last edited by johngibb123 : November 8th, 2012 at 02:12 AM.
  #11  
Old November 8th, 2012, 03:36 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by johngibb123 View Post
select price filter and then select brand filter, now selected price filter gone!
You must pass the price filter parameters into the brand filter. Add the following code in between your brand filter's <form> tags:

<?php if (@$_GET['price']){ echo '<input type="hidden" name="price" value="'.strip_tags($_GET['price']).'" />'; } ; ?>
  #12  
Old November 8th, 2012, 05:32 AM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

Quote:
Originally Posted by Eric View Post
You must pass the price filter parameters into the brand filter. Add the following code in between your brand filter's <form> tags:

<?php if (@$_GET['price']){ echo '<input type="hidden" name="price" value="'.strip_tags($_GET['price']).'" />'; } ; ?>

I didnt find any form tag inside my brand filter...

BUT I already have above line here: I have in Views --> Category page --> module template

Code:
<h2>  

  [store.if brand="on"] by [store.get param="brand"][/store.if]
  [store.if merchant="on"] sold by [store.get param="merchant"][/store.if]
  [store.if price="on"] priced [store.get param="price"][/store.if]
</h2>


<!-- Sorting By Users -->
<div class="dffltrs">
  <form method="get">
    
    <?php if (@$_GET['brand']){ echo '<input type="hidden" name="brand" value="'.strip_tags($_GET['brand']).'" />'; } ; ?> 
<?php if (@$_GET['price']){ echo '<input type="hidden" name="price" value="'.strip_tags($_GET['price']).'" />'; } ; ?> 
<?php if (@$_GET['word']){ echo '<input type="hidden" name="word" value="'.strip_tags($_GET['word']).'" />'; } ; ?>
<?php if (@$_GET['ppp']){ echo '<input type="hidden" name="ppp" value="'.strip_tags($_GET['ppp']).'" />'; } ; ?> 
<?php if (@$_GET['sort']){ echo '<input type="hidden" name="sort" value="'.strip_tags($_GET['sort']).'" />'; } ; ?>
    
    
    <span class="dflside">
      Products per page:
      <?php echo datafeedr_tools()->form_select("ppp",
        array(
        "12" => "12",
        "24" => "24",
        "36" => "36",
        "48" => "48",
        )); ?>
    </span>
    <span class="dfrside">
      Sort by:
      <?php echo datafeedr_tools()->form_select("sort",
        array(
        "price"   => "Price (low to high)",
        "-price"   => "Price (high to low)",
        "name"     => "Product Name (a - z)",
        "-name"   => "Product Name (z - a)",
        )); ?>
      <input type="submit" value="Go" class="dfsbmt" />
    </span>
    <div class="clearingdiv">&nbsp;</div>
  </form>
</div>



<!-- Pagination Links (Top) -->
<div class="pgr">
  Pages:
  [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt='']
  [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt='']
  [pager.pages delim=' ']
  [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt='']
  [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt='']
</div>
<!-- /Pagination Links (Top) -->


<script>
  
  $('label:first').html().substr(0,13)
    
    </script>   


<!-- Product List -->
<div class="pl">
  [product.each]

  <div class="t1 col5">



    <ul class="products ribbon">
                          
      <li class="product">

          
        <a href="[product.url]" target="_blank">
          
          <div class="thumbnail">
          
              <img width="150" height="150" src="[product.image direct='1' tag='0']" class="attachment-shop_catalog wp-post-image" alt="[product.name]" title="[product.name]">    
              
              <div class="thumb-shadow"></div>
                
            <label class="below-thumb" >[product.name] </label>
            
            </div>

            
          <span class="price">
            
            <span class="amount">
          
              <?php if ($product->saleprice > 0 &&  $product->saleprice < $product->price) { ?>

                    <div class="prc">
                <small>
                   <span style="text-decoration: line-through; color:blue;">[product.currency mode='sign'][product.price]</span>&nbsp&nbsp
                   <span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span>
                </small>
                    </div>
                    <?php } else { ?>
                    <div class="prc">
                <small>
                  <span style="font-weight: bold; color:blue;">[product.currency mode='sign'][product.price]</span>
                </small>
                    </div>    
                   
                <?php } ?>                

          
              </span>
          
            </span>
        
          </a>
          
        
        
          <div class="buttons" style="opacity: 0; visibility: visible; overflow: hidden; height: 41px; ">
                <a href="[product.url]"  class="add-to-cart add_to_cart_button product_type_simple" style="position: relative; top: -41px; " target="_blank">SHOP NOW</a>
           </div>      
        
      
      </li>    
          
          
    </ul>



  </div>  <!-- t1 col3 #end --> 
        
       
      [/product.each]
      <div class="clearingdiv"> </div>
  
 </div>
<!-- /Product List -->


<!-- Pagination Links (Bottom) -->
<div class="pgr">
  Pages:
  [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt='']
  [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt='']
  [pager.pages delim=' ']
  [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt='']
  [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt='']
</div>
<!-- /Pagination Links (Bottom) -->
  #13  
Old November 8th, 2012, 06:08 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

You need to have a <form> tag for your brand select menu.
  #14  
Old November 9th, 2012, 04:33 PM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

Bro,

I ddint understood.. pls show me where to add from my brand filter code, below:



Quote:
<select id="brand" name="brand" onchange="gotoPage()">

<?php
$brands = dfr_get_brands_list($category);
foreach ($brands as $brand) : ?>

<option value="<?php echo $brand; ?>" ><?php echo $brand; ?></option>

<?php endforeach; ?>

</select>


<?php if (@$_GET['brand']) { ?>


<a href="[server.url type='fullpage' query='-brand']"><FONT COLOR="red"><?php echo"[[X] Remove Brand "; ?><?php echo @$_GET['brand']; ?></font></a>


<?php } ?>


and one more thing: After adding your code, do I need to change this?
Quote:
var url = "http://laptopsisland.com/shop/c/laptops/";
or what..? Iam thinking to have only 1 brand filter for all of my categories..

pls suggest me...


Thanks!
  #15  
Old November 9th, 2012, 05:46 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi
Quote:
Originally Posted by johngibb123 View Post
I ddint understood.. pls show me where to add from my brand filter code, below:
Where are your <form> tags? The code I suggested to add needs to be between <form> and </form>. I see neither of those tags.

Quote:
Originally Posted by johngibb123 View Post
and one more thing: After adding your code, do I need to change this?
I would do this:
Code:
var url = <?php echo $_SERVER['PHP_SELF']; ?>;
Although I'm not sure if that will work. I would consult the developer of that Javascript code to be sure.

Eric
  #16  
Old November 10th, 2012, 04:52 AM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

hi,

i just did what you said, but its not working bro..



Quote:
<form>

<select id="brand" name="brand" onchange="gotoPage()">

<?php
$brands = dfr_get_brands_list($category);
foreach ($brands as $brand) : ?>

<option value="<?php echo $brand; ?>" ><?php echo $brand; ?></option>

<?php endforeach; ?>

</select>

</form>


<?php if (@$_GET['brand']) { ?>


<a href="[server.url type='fullpage' query='-brand']"><FONT COLOR="red"><?php echo"[[X] Remove Brand "; ?><?php echo @$_GET['brand']; ?></font></a>


<?php } ?>

The below script code in my header.php file:

Quote:
<script>

function gotoPage(){
var url = <?php echo $_SERVER['PHP_SELF']; ?>;
var sel = document.getElementById("brand");
var brand = sel.options[sel.selectedIndex].text;
window.location.href = url + "?brand=" + brand;
}

</script>


pls dont say me to contact developer, i dnt have money. iam almost end inorder to make it work.. pls try from ur end and lemme know..
  #17  
Old November 10th, 2012, 06:28 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Try this:
Code:
<form>

<?php if (@$_GET['price']){ echo '<input type="hidden" name="price" value="'.strip_tags($_GET['price']).'" />'; } ; ?>

<select id="brand" name="brand" onchange="gotoPage()">

<?php 
$brands = dfr_get_brands_list($category);
foreach ($brands as $brand) : ?>

<option value="<?php echo $brand; ?>" ><?php echo $brand; ?></option>

<?php endforeach; ?>

</select>

</form>


<?php if (@$_GET['brand']) { ?>


<a href="[server.url type='fullpage' query='-brand']"><FONT COLOR="red"><?php echo"[[X] Remove Brand "; ?><?php echo @$_GET['brand']; ?></font></a>


<?php } ?>
I can't support your custom Javascript code. You'll need to figure that out. I'm not a Javascript developer.
  #18  
Old November 10th, 2012, 09:18 AM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

After when i tested, there is something wrong only with the below statement bro:


Quote:
var url = <?php echo $_SERVER['PHP_SELF']; ?>;
why dont you pls try my javscript code and ur given brand filter code from your end.. (i think there is np with ur brand filter code..)
  #19  
Old November 10th, 2012, 11:09 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

I can't support your custom JS code. That is beyond the level of support we can provide. I'm sorry, but there's nothing else we can do.

Eric
  #20  
Old November 10th, 2012, 12:37 PM
johngibb123 johngibb123 is offline
 
Join Date: Aug 2012
Posts: 329
Default

just wnana know, is it working for U?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Price filter has a bug officialwatch Problems 1 November 6th, 2012 08:26 AM
Pagination rel=”next” and rel=”prev” ? cashnow Questions 8 June 21st, 2012 07:32 AM
Price filter quitjob Questions 1 March 18th, 2012 09:59 AM
'Remove Price filter' like brand filter Giftoly Questions 1 January 20th, 2012 10:48 AM
Price Filter Not Working bredies Problems 1 May 29th, 2011 12:18 AM


All times are GMT -5. The time now is 04:23 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.