![]() |
|
Home | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]() Hi, I just installed and began using Datafeedr today an flippin' love it, I wonder though if you can help me with this little issue.
I've playing about with the widgets and it's all been made very easy to set up but I wonder if there's a way of having the Merchant and Brand filters automatically populated according to the products that are in my store in the same was as the Category one is? I see how the widget is edited manually but I'd like to be able to hand this over to my client when it's all done knowing that those widgets will stay up to date, let's say if she adds a merchant to the store, without me having to log in and edit the widget. Thanks very much for you time Kev |
#2
|
||||
|
||||
![]() Hi Kev,
You could always add a couple of queries and add those to theme's functions.php file. But, there might be way more merchants and or brands than you might anticipate: Here's one that could work for your merchants. You can do the same thing for brands. PHP Code:
PHP Code:
Eric
__________________
![]() ![]() ![]() ![]() |
#3
|
|||
|
|||
![]() Hi Eric, this has almost got it, the function works great and the I'm getting an automatically generate list of merchants. The links however don't work and I can't figure out why. Could you take a look please at the 'Stores' widget on my home page and give advise me on fixing it so that these links are interpreted correctly.
My dev site can be found at www.hersuits.co.uk/dev Many thanks Kev |
#4
|
||||
|
||||
![]() Try this:
PHP Code:
__________________
![]() ![]() ![]() ![]() |
#5
|
|||
|
|||
![]() Hi Eric. Sadly, that's not done it. In fact it stops outputting the buttons at all.
If I add some dots either side of the variables I get the buttons back but still not tracing out the link correctly. I've left it as echo "<li><a href=\"[server.url type='fullpage' query='.$merchant.']\">.$merchant.</a></li>"; for you to have a look at. www.hersuits.co.uk/dev Thanks Kev |
#6
|
||||
|
||||
![]() OK, I figured out the issue. Try this:
PHP Code:
__________________
![]() ![]() ![]() ![]() |
#7
|
|||
|
|||
![]() Aces!!! That's done it, thanks again Eric.
|
#8
|
|||
|
|||
![]() Store ID: 36187
Website URL: http://www.thewildstyles.com URL to page in question: http://www.thewildstyles.com/store/category/clothing/ Hi there, This piece of code works really good. I've managed to pull all my brands from the database with this code. I've used the code from ""Creating Filters" post to put the list in a dropdown.. See the code: <?php if (@$_GET['brand']) { ?> <h6><a href="[server.url type='fullpage' query='-brand']">[X] Remove your choice "[store.get param="brand"]"</a></h6> <?php } else { ?> <form method="get"> <select name="brand" onchange='this.form.submit()'> <?php $brands = dfr_get_brands(); foreach ($brands as $brand) { $brand = urlencode($brand); ?> <option value="<?php echo urldecode($brand); ?>"<?php if (@$_GET['brand']) {echo ' selected="selected"';}?>><?php echo urldecode($brand); ?></option> <?php } ?> </select> </form> <?php } ?> Now my issue is that when I have other filters on (merchant, etc) and I choose a different brand, it erases all the other filters and goes to the brand page.. While all other filters don't have that issue, you can add and remove as many as you want without overriding anything. So Im sure I've made some errors in the code, I'm not an expert unfortunately. Could either of you help me out with this? Thanks in advance. Ivar Zuidhoek. |
#9
|
||||
|
||||
![]() Hi
You'll need to pass those parameters along in your <form>. So, between <form> and </form> you can add something like this: HTML Code:
<?php if (@$_GET['merchant']){ echo "<input type='hidden' name='merchant' value='".strip_tags($_GET['merchant'])."' />"; } ?>
__________________
![]() ![]() ![]() ![]() |
#10
|
|||
|
|||
![]() hey Eric,
thanks for your fast response. really appreciate it. however when I included that line inbetween <form> and </form> what happened is that when I selected a brand, then an merchant, then remove the brand, I couldn't pick another brand.. maybe it easier to see for yourself, you can see the filters @ work here: http://www.thewildstyles.com/store/category/clothing/ |
#11
|
||||
|
||||
![]() Hi
You need to put the above code within the <form> tags but not between the <select> tags. It should appear immediately after the <form> tag and just before the <select> tag. Eric
__________________
![]() ![]() ![]() ![]() |
#12
|
|||
|
|||
![]() works like a charm. brilliant. thank you so much.
|
#13
|
|||
|
|||
![]() Store ID: 36187
Website URL: http://www.thewildstyles.com URL to page in question: http://www.thewildstyles.com/store/category/clothing/ I have another question about this piece of code. It works great. However I'm gonna have a few main categories later on, like Clothing, Music, Accesoires.. I only wanna draw the brands from articles I add to the clothing category.. Is that possible? |
#14
|
||||
|
||||
![]() Hi
You could modify the query like this: PHP Code:
Eric
__________________
![]() ![]() ![]() ![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Brand Filter Drop-Down with All Brands option | meperez | Questions | 8 | March 26th, 2011 12:04 AM |
Brand Filter = Brands Only show when in Category | macfink | Questions | 3 | March 25th, 2011 12:55 PM |
Drop down Menu from filter by Brand | macfink | Questions | 4 | March 25th, 2011 09:32 AM |
Brand filter? | sylviathewitch | Problems | 3 | March 8th, 2011 08:43 AM |
Merchant Filter Will Not Show Merchant Correctly | laura90059 | Questions | 6 | March 7th, 2011 10:46 PM |