Archived topic
Sticky add to cart box
7 replies · Started by retroreiz on July 28, 2019
Good morning,
in this post I have seen that a very nice function "Sticky add to cart box" was implemented as a PHP code.
https://generatepress.com/forums/topic/upsell-products-and-related-products-css-styling-questions/
Since the code also includes the scrolling of images and this destroys my entire layout. I wanted to ask how the PHP and CSS code should be if you only want to use the "Sticky add to cart box" function?
I already have the code "add_filter ('wc_add_to_cart_message_html', '__return_false');" used so that the page is not reloaded and says that the item has been successfully added to the cart. This also works quite well on product archive pages, but unfortunately not on single product pages. The single product page will be reloaded. Can I deactivate this somehow synonymous for single product pages disable and the "Sticky add to cart box" aktivate so looks like there: https://shopkeeper.wp-theme.design/shop/women/button-embellished-printed-cotton-jersey-top/
Maybe my way is completely wrong and I have to set something else in the theme for it to work at all and not use the function "add_filter ('wc_add_to_cart_message_html', '__return_false');".
Many thanks and greetings, Andreas
Hi there,
do you meant this topic:
This is a custom solution and was designed to match that particular site, if you have a staging server that you can test the code on then i can take a look to see how to resolve the issue.
Yes i mean this topic :)
Can I easily install the theme on a test installation? Offended by license? I would install it on a subdomain, it is ok?
The GeneratePress Premium license can be installed on unlimited sites including subdomains
Hi David,
i have finally created a test environment.
I have followed the code and instructions from https://generatepress.com/forums/topic/scrolling-woocommerce-product-images-with-sticky-add-to-cart-box/#post-922915.
This is how it looks like: link delet
I would be happy if it somehow works, this one great feature: https://i.ibb.co/CwFmX27/09.png
As in this sample installation: https://shopkeeper.wp-theme.design/shop/women/button-embellished-printed-cotton-jersey-top/
I do not need that with the scroll pictures. My only concern is the sticky add to cart function.
Do you still need something from me? May like to provide access data or similar.
Thank you in advance.
Greetings Andreas
OK - yeah the gallery stack doesn't really work with your shop design.
Currently we only have the Display cart panel on add to cart option for the Product archives ( Customizer > Layout > Woocommerce ) - its not currently possible to do this on the Single Produce page as it requires Ajax which is not loaded by woocommerce on the single product.
It is something we're looking at for the future but not an option today.
Hi David,
that's okay :)
Thank you very much for taking the time :)
Greetings, Andreas
you're welcome