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 4 years, 9 months ago by Ross.
-
Anonymous(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.Ross Moderator(Private) February 10, 2020 at 5:18 pm #233559This reply has been marked as private.Anonymous(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
Anonymous(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
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