Forums Forums Search & Filter Pro Results not rendering evenly on the page.

Tagged: ,

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #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
    #233483
    This reply has been marked as private.
    Anonymous
    #233541
    This reply has been marked as private.
    Ross Moderator
    #233559
    This reply has been marked as private.
    Anonymous
    #233571

    Thanks 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
    #233597

    Hi 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 Guitar

    All 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
    #233691

    Hi 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
    #233746

    Hi 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

    Anonymous
    #233783

    Yes 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
    #233939

    So 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

Viewing 10 posts - 1 through 10 (of 12 total)