Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   "View products per page" question (/showthread.php?t=8230)

niche888 November 28th, 2012 03:25 PM

"View products per page" question
 
Store ID: 34150
Website URL: www.BoutiqueShop.co
URL to page in question: http://www.boutiqueshop.co/shop/?brand=Hermes

Hi there,

I am trying to change the "View products per page" at the bottom right for this page: http://www.boutiqueshop.co/shop/?brand=Hermes

for example change from current 15 products per page to 72 products per page, then the whole url changed to: http://www.boutiqueshop.co/shop/?ppp=72
therefore lost the "?brand=Hermes" filter string.

How can I fix it, so the "?ppp=72" will append to "?brand=Hermes"?

Thanks in advance!!

Eric November 28th, 2012 03:34 PM

Hi,

In your Store's Front Page > Product list module you have 2 lines of code like this:
HTML Code:

<form method="get">
Change that to:
HTML Code:

<form method="get">

<?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']).'" />'; } ; ?>

That should do the trick.

Eric

niche888 November 28th, 2012 03:49 PM

Thanks Eric for the quick response!

I add the code to the Store's Front Page > Product list module, but it still act the same.
Here is the code in the Product List Module that triggers the "View product per page"

<span class="dfrside">
View products per page:
<?php echo datafeedr_tools()->form_select("ppp",
array(
"12" => "12",
"24" => "24",
"36" => "36",
"48" => "48",
"72" => "72",
)); ?>
<input type="submit" value="Go" class="dfsbmt" />
</span>

I haven't figured how to fix the problem. Could you take a look?

Thanks a lot!

niche888 November 28th, 2012 03:56 PM

And here is the code for the search:
<!-- Search Fields -->
<span style="font-weight: normal; color:#444444;">
<?php if (@$_GET['word']){ ?><b>Keyword: </b>[store.get param="word"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php } ?>
<?php if (@$_GET['brand']){ ?><b>Brand: </b>[store.get param="brand"]&nbsp;&nbsp;&nbsp;<a href="[server.url type='fullpage' query='-brand']">[X] Remove Brand Filter</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php } ?>
<?php if (@$_GET['merchant']){ ?><b>Merchant: </b>[store.get param="merchant"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php } ?>
<?php if (@$_GET['tags']){ ?><b>Tags: </b>[store.get param="tags"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php } ?>
<?php if (@$_GET['price']){ ?><b>Price Range: </b>[store.get param="price"]&nbsp;&nbsp;&nbsp;<a href="[server.url type='fullpage' query='-price']">[X] Remove Price Filter</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php } ?>
</span>

<!-- /Search Fields -->

Eric November 28th, 2012 03:58 PM

Hi,

You added the code correctly to the first occurrence of <form method="get">. But you have 2 occurrences of <form method="get"> and the same code must be added in both of those places.

Eric

niche888 November 28th, 2012 04:20 PM

That works perfectly! :) Now I one more very similar question:
On this page: http://www.boutiqueshop.co/shop/?saleprice=1-
when I change the "View products per page" to 72, the URL also changes to: http://www.boutiqueshop.co/shop/?ppp=72

Should I add the following code? Or something else?
<?php if (@$_GET['brand']){ echo '<input type="hidden" name="saleprice" value="'.strip_tags($_GET['brand']).'" />'; } ; ?>

Thank you so much Eric for the great help as always!

Eric November 28th, 2012 04:27 PM

Hi,

Add these lines to the other 2 new lines you've just added:

HTML Code:

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

Eric

niche888 November 28th, 2012 04:31 PM

PERFECT!!! Works like a charm!

Thank you Eric as always! :)


All times are GMT -5. The time now is 12:55 PM.

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