- This topic has 33 replies, 2 voices, and was last updated 1 year, 11 months ago by
David.
-
AuthorPosts
-
December 9, 2021 at 11:35 am #2043939
David
StaffCustomer SupportTry this CSS:
/* Set fixed space between Image and content *./ .woocommerce ul.products li.product a.woocommerce-LoopProduct-link { margin-bottom: 5px; } /* Force content to fill height of product grid */ .woo-content-wrap { flex: 1; display: flex; flex-direction: column; } /* Center button */ .woocommerce ul.products li.product .woo-content-wrap .button { margin: unset; } /* Auto space above to price to keep price and buttons aligned */ .woocommerce ul.products li.product .price { margin-top: auto; }
December 9, 2021 at 11:56 am #2043964Paul
Wow, this is perfect. Thank you so much, David.
I’ve been thinking about this already in a while and I think now it’s the time to ask, without wanting to be intrusive: Is there a postal address that I can send you some Austrian wine and delicious pumpkin seed oil for salads and soups for you to enjoy? I mean that, because your support is exceptional. I’m not a professional developer, but we’ve been working a whole lot on this site and since a new book is going to be published tomorrow, it should go live to this date. I am very happy with having chosen GeneratePress and with my new site. The only thing I was worried about was, if I will be able to fix the last errors, especially this one. Now I’m positive that the last tweaks and changes will work out smoothly and your help has been gold.December 9, 2021 at 4:43 pm #2044140Paul
Hey, I celebrated too quickly.
There is still the problem with Cross-Sells on the cart page.
Is there a way to fix that? (I had to delete the cross-sells in the meanwhile to avoid the faulty display, so it’s not replicable at the moment)
December 10, 2021 at 3:16 am #2044519David
StaffCustomer SupportOh that is weird. Presumably the columns are not behaving themselves. Can you re-enable the cross sells so i can see what happened here?
Regarding your super kind offer – not sure what the protocol is there. If you want to send some info via Account form to discuss 🙂
December 10, 2021 at 4:43 am #2044590Paul
Okay, I will get in touch! 🙂
I just reenabled the cross sells. You have to add the book “Leuhtfeuer im Kupfer der Dämmerung” (red book, second row in center) to the cart, as this product ist the only one with cross-sells applied in WooCommerce.
December 10, 2021 at 5:16 am #2044621David
StaffCustomer SupportHmmm… just to confirm my suspicions can you temporarily remove / disable this snippet:
https://generatepress.com/forums/topic/problems-with-woo-attributes-hook/#post-2043820
December 10, 2021 at 5:42 am #2044646Paul
I disabled it. However, there’s still something wrong in the cart section.
December 10, 2021 at 6:03 am #2044672David
StaffCustomer SupportHmmm… so its not that function thats a problem. You can re-enable that.
What else do we have ? Theres the function thats adding thewoo-content-wrap
– what if you disable that ?Sorry its trial an error – theres basically some broken HTML being added to those ( and only those ) products.
December 10, 2021 at 7:15 am #2044725Paul
Yes, now we got the culprit. When I deactivate this code, then the cross-sells on the cart page are fine:
/** * Woo Commerce Shop Wrapper */ add_action('woocommerce_shop_loop_item_title', 'woo_shop_loop_item_open_wrapper',9); add_action('woocommerce_after_shop_loop_item', 'woo_shop_loop_item_close_wrapper',100); function woo_shop_loop_item_open_wrapper() { echo '<div class="woo-content-wrap">'; } function woo_shop_loop_item_close_wrapper() { echo '</div>'; }
However what happens then is that the Add-to-cart-button is left-aligned and not centered.
I left the code activated for now because the site is live, but just tell me if I should deactivate it.
December 10, 2021 at 7:52 am #2044862David
StaffCustomer SupportThis function:
function woo_shop_loop_item_close_wrapper() { echo '</div>'; }
Can you change it to:
function woo_shop_loop_item_close_wrapper() { echo '</div><!-- close woo wrapper -->'; }
It won’t fix the issue but it’ll provide a comment in the HTML that i can look for. I get the impression that function isn’t being hooked in on the cross sells.
December 10, 2021 at 8:08 am #2044887Paul
Thanks for checking that. I replaced the function!
December 10, 2021 at 8:29 am #2044914David
StaffCustomer SupportWell how very bizarre – its not doing anything lol.
I am kinda thinking – do we need these functions anymore? As we no longer require the wrapper to place the content to the side.
What happens if you remove them altogether?
December 10, 2021 at 8:32 am #2044921Paul
Yeah, I was wondering about this too. Yeah, what happens is, that the add-to-cart-button is left-aligned and not center-aligned anymore. Can this be tackled with CSS? I’ll leave tha functions out for now.
December 10, 2021 at 8:35 am #2044926Paul
David, I solved the problem!
There was the entry “margin: -18px” in the buttom customisation as an old remains. Everything’s fine now! 🙂 Thank you so much for your help and I’ll write you through the contact form. 🙂December 10, 2021 at 8:59 am #2044959David
StaffCustomer SupportAwesome – glad to hear that!!
-
AuthorPosts
- You must be logged in to reply to this topic.