Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Change size – Won't work!
This topic contains 14 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 5 months ago.
- AuthorPosts
- March 16, 2017 at 10:40 pm #12363
Hey Guys,
I want to change the size of my search bar but it doesn’t work. I increase the amount of pixel of the high but nothing happens…
Also if I change the width… I wan to make it smaller… Nothing happens…Could you please check that?
Greetings and Thank You!
March 17, 2017 at 12:18 pm #12369Hi!
Thank you for the proper details!
I just checked, but it appears to me the same size as configured on the back-end (60px height, 100% width): https://i.imgur.com/kN5M7mJ.jpg
After making changes and re-freshing your front-end I recommend clearing all caches, in case you have any. Refreshing by pressing CTRL + SHIFT + R is usually enough, but if you have server side cache, then you might have to clear that as well.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 17, 2017 at 1:27 pm #12370Where do you configure that?
Because I also checked Firefox and other PC, but they do not see any changes?
You cann set the height to 100px if you want. But if I change the high in:Ajax Search Pro -> main Settings -> Theme options -> Overall box layout -> Seach box height -> 60px -> save
I do not see any changes!
March 17, 2017 at 2:31 pm #12371Where do you configure that?
What do you mean?Because I also checked Firefox and other PC, but they do not see any changes?
Best,
Make sure to clear your site and browser cache, on all levels. If you use clodudflare or other CDN, make sure to clear that as well! Cloudflare can cache all CSS and Javascript files, and cause this issue.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 17, 2017 at 5:18 pm #12376I mean, could you please describe, where are you change the width and hight of the search bar?
I use cloudflare. But I changed it yesterday!
March 17, 2017 at 5:23 pm #12377You can change it exactly where you described: https://i.imgur.com/4Sb1GN5.png
You always have to clear all the cache when you make style changes on your website, otherwise cloudflare will serve the old CSS and JS files. This is definitely only a cache related problem, as the option changes, and if I load up the stylesheet in console with a different query string, the changes are there.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 17, 2017 at 5:58 pm #12380Okay, it is now working! – Thank You!
And I have one question left. Is it possible to show the price of each product which is shown in the result list of the ajax search bar?
The values of the prices are saved in custom fields. To get the lowest price of one product I am supposed to make a SQL query or to make a PHP query.Is it possible?
Greetings
March 17, 2017 at 6:03 pm #12382Hi,
If it’s stored in a custom field, you can use the advanced title or description fields for that, without coding. Please check this section of the documentation: Advanced title & description fields
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 17, 2017 at 6:08 pm #12383Hi,
okay, Thank You! – I am going to check it out right now.
Do you know Advanced Custom Fields?The prices are stored in a repeater. So I have a different amount of prices for each product because one product is linked to 3 shops and one is linked to only 1 shop. My problem now is to get the cheapest price. Because the cheapest price could be in the repeater field 0, 1 or 2 for the product with 3 different linked shops…
So, I cannot say select field 0 to get the cheapest price. I must compare all fields of each product. Can I also do that in the plugin?
March 20, 2017 at 11:01 am #12393Hi,
With a custom code this could be possible. As a starting example here is this tutorial: Custom fields in result titles
I guess ACF has functions to get the repeater field values based on post ID and repeater field name, that’s the one thing you will need. And then just loop over the values to find the lowest one, and add it to the title field.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 20, 2017 at 2:22 pm #12403Hey,
there is a way to get the lowest price by post ID. I wrote you an example for that:
http://pastebin.com/5kEEQTpHMy question now is, how can I get the post ID from the search and how can I add the filter?
Greetings and Thank You!
March 20, 2017 at 3:27 pm #12404Hi,
In that code loop the $v->id is the post id. I’ve aggregated your solution with the sample code. I haven’t tested this, but it should be close to a solution:
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 20, 2017 at 3:41 pm #12407Do I have to return the price or something like this?
"<font color=\"#01de01\">" . min($price_array_min) . "€<font>";
And I have two further question.
1. Where I’m supposed to insert the code?
2. Do I have to take any actions in the Ajax Search Bar Pro Settings? – Or will the result displayed automated?March 20, 2017 at 3:47 pm #12408Okay, it is working!
Thank You! – It is also the right price! 🙂You can test it here https://gamekeys-shop.de/
But I have one question left!
Is, and if yes, how, it possible to display the price below the title and can I add some words like “Now”?March 20, 2017 at 10:15 pm #12410I’m glad it’s working now 🙂
Well, for example instead of changing the title, you could add it to the description field instead. So I would change line 12 in the code above to:
$results[$k]->content .= $price;
If you want to add some words to it, you can simply do it as well:
Best,$results[$k]->content .= 'Words before ' . $price . ' words after';
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.