Support Forums › Forums › Search & Filter Pro › Results not rendering evenly on the page.
Tagged: Bigcommerce, SFPro
- This topic has 11 replies, 2 voices, and was last updated 11 months ago by
Ross.
- Samuel Collins(Private) February 7, 2020 at 8:55 pm #233446
Hi, The Bigcommerce products that I’m rendering on my category pages through SFPro are not rendering evenly on the page. I have tried to manipulate the elements using CSS and through changing the HTML on results.php but for some reason there is a break halfway through the last item on the first column and the second half of the item is being rendered on the second column. Is there anyway to make sure SFPro results are rendered evenly on a grid? Thanks.
Ross Moderator(Private) February 10, 2020 at 11:10 am #233483This reply has been marked as private.Samuel Collins(Private) February 10, 2020 at 2:19 pm #233541This reply has been marked as private.Ross Moderator(Private) February 10, 2020 at 5:18 pm #233559This reply has been marked as private.Samuel Collins(Private) February 10, 2020 at 5:40 pm #233571Thanks that helped a bit. But after deleting the <p> element around each thumbnail, the problem persists. I’m pretty sure the issue lies in one empty <p> element that sits right above the search and filter search results container, as you can see when you inspect the page. I can’t figure out how to get rid of this element.
Thank you and let me know.
Ross Moderator(Private) February 11, 2020 at 9:47 am #233597Hi Samuel
Do you mean the issue with the guitars in the last column, not being in place?
This is because of the image size for this product:
Hagstrom Fantomen Black Ghost Electric GuitarAll the other images are perfect squares (same height and width), whereas this one is wider, so the height doesn’t match because the image gets resized to 237 x 91, instead of 237 x 237.
BTW, did you see S&F integrates with Elementor Pro posts widget? https://searchandfilter.com/documentation/3rd-party/elementor/
Thanks
Samuel Collins(Private) February 11, 2020 at 4:03 pm #233691Hi Ross,
Yes I got the items to render evenly. But now I am facing another issue. I want to display the price for each item but I cannot find a php price temmplate tag to that I can add to my results.php. I looked through the documentation and could not find a price tag or a brand tag, which I would also like to add.
Thanks for your help,
Sam
Ross Moderator(Private) February 12, 2020 at 11:03 am #233746Hi Sam
I can’t remember how bigcommerce stores the price, but from looking at your price sliders meta key, it would be something like:
$price = get_post_meta(get_the_ID(), 'bigcommerce_calculated_price', true, true);
Where
bigcommerce_calculated_price
is the name of the meta key for price.Thanks
Samuel Collins(Private) February 12, 2020 at 1:50 pm #233783Yes that makes sense, bigcommerce_calculated_price does seem to be the meta key. But can you give me a better idea of how to add that line into my results.php file?
Thanks
Ross Moderator(Private) February 14, 2020 at 11:33 am #233939So in results.php, you have the line:
<p><br /><?php the_excerpt(); ?></p>
Straight after you can add this code above, so that block becomes:
<p><?php the_excerpt(); ?></p> <p><?php $price = get_post_meta(get_the_ID(), 'bigcommerce_calculated_price', true, true); echo $price; ?></p>
Thanks
- AuthorPosts
You must be logged in to reply to this topic.
Support Hours
Our support hours are:10am - 5pm (GMT), Monday - Friday
Please be aware that tickets opened over the weekend will looked at on Monday.