- This topic has 17 replies, 2 voices, and was last updated 4 years, 2 months ago by Tom.
-
AuthorPosts
-
February 13, 2020 at 10:38 am #1164446pairfum
Dear Support,
With WooCommerce on mobile devices, the individual product page only shows a single column. As a consequence, the add-to-cart button is quite far down the page, compared with the two column layout on PC / tablet.
You can see this on our live site:
https://www.pairfum.comA potential solution would be for the sticky ‘add-to-cart’ button to appear sooner/higher up on the page and not only when the standard ‘add-to-cart’ button has passed from the view.
Is this possible?
Many thanks for your help.
Kind regards,
Pairfum London
February 13, 2020 at 4:27 pm #1164660TomLead DeveloperLead DeveloperHi there,
There isn’t a way to tell it to show up sooner, but we can tell it to always show up on mobile:
@media (max-width: 768px) { .single-product .add-to-cart-panel { opacity: 1; } }
Let me know if that helps or not 🙂
February 14, 2020 at 4:59 am #1165078pairfumDear Tom,
This is great idea!
We have implemented it on our site and find that it works well on both single & variable product pages. We noticed that it does not appear for some variable products but don’t know yet why.
There is though one odd thing we notice, the panel also appears on the home page of our live site (https://www.pairfum.com) before anything has been added to the cart. This is not ideal and we would like to avoid this. Can you let us know how?
Here is a screenshot: https://i.imgur.com/U583EYM.png
It is odd, however, that the panel does NOT appear on our staging site: https://staging.pairfum.com –
Here is a screen shot: https://i.imgur.com/sHQfzKo.png
We have not yet worked out why it appears on one but not the other site. Would you know?
Many thanks for your help on this.
Kind regards,
Pairfum London
February 14, 2020 at 6:00 am #1165128pairfumSorry Tom,
We just noticed one other thing:
On ‘bundled’ and ‘grouped’ products the sticky add-to-cart panel does not appear at all.
Here are some screen shots:
– single product:
https://www.pairfum.com/product/new-diffuser-refill-reeds-classic-long-diffuser-sticks/– variable product:
https://www.pairfum.com/product/reed-diffuser-refill/– bundled product:
https://www.pairfum.com/product/natural-reed-diffuser-set-oil-refill-sticks/– grouped product:
https://www.pairfum.com/product/eau-de-parfum-intense/As you can see the last two products do not show a sticky add-to-cart panel on Desktop (and Mobile/Tablet).
Is it possible for the panel to appear on these as well?
Kind regards,
Pairfum London
February 14, 2020 at 10:15 am #1165588TomLead DeveloperLead DeveloperCan you try the updated CSS?: https://generatepress.com/forums/topic/display-sticky-add-to-cart-button-sooner/#post-1164660
The panel doesn’t work with some product types (as you’ve found out). We’re working on a solution to that 🙂
February 15, 2020 at 1:12 am #1165926pairfumHi Tom,
Yes, this works now.
It looks really good and does exactly what we were hoping for (a pity it doesn’t work for bundled & grouped products, yet):
https://www.pairfum.comThank you for this.
The only thing we noticed is that our ‘abandoned cart recovery’ plugin doesn’t trigger the ‘add your email’ pop-up when you click ‘add-to-cart’ on the sticky banner. The pop-up is only triggered when you click the standard WooCommerce ‘add to cart’ button.
What code do we need to add so that the pop-up also triggers when a visitor clicks ‘add-to-cart’ on your GP sticky banner?
Many thanks for your help on this.
Kind regards,
Pairfum London
February 15, 2020 at 8:24 am #1166312pairfumHi Tom,
I have just noticed that the sticky ‘add-to-cart’ panel also appears on blog posts.
Here is a screen shot:
There is no need for it to appear here and it only a distraction.
Can you please amend the code accordingly.
Many thanks,
Pairfum London
February 15, 2020 at 9:20 am #1166362TomLead DeveloperLead DeveloperHi there,
It depends on how that plugin triggers the popup. You may need to ask them.
Here’s how we add the “add to cart” button:
<form action="<?php echo esc_url( $product->add_to_cart_url() ); ?>" class="cart" method="post" enctype="multipart/form-data"> <button type="submit" class="button alt"><?php echo esc_html( $product->add_to_cart_text() ); ?></button> </form>
It’s not filterable right now, but that may be something we can add to 1.10 or 1.11.
As for the other issue, we’ve updated the CSS: https://generatepress.com/forums/topic/display-sticky-add-to-cart-button-sooner/#post-1164660
February 15, 2020 at 11:43 am #1166460pairfumDear Tom,
Many thanks for the updated CSS.
This now works perfectly.
We will pass your code for the ‘add-to-cart’ button to the developer of the abandoned cart plugin.
Many thanks for your help with this problem.
Kind regards,
Pairfum London
February 15, 2020 at 8:28 pm #1166649TomLead DeveloperLead DeveloperNo problem! 🙂
February 17, 2020 at 4:00 am #1167833pairfumHi Tom,
We have been speaking with the developer of the abandoned cart plugin we are using and they are asking the following:
“try to add more class ‘single_add_to_cart_button’ in your button”
Is it possible to add this to the GP Child Theme?
Many thanks for your help.
Pairfum London
February 17, 2020 at 7:36 pm #1168678TomLead DeveloperLead DeveloperIt’s not possible to add via child theme, unfortunately.
Is there a way for us to add their trigger to our own class name using some javascript?
I’ll look at adding the class name in our next GPP update.
February 18, 2020 at 7:44 am #1169282pairfumThat would be fantastic, Tom.
Many thanks for your help.
Kind regards,
Pairfum London
February 18, 2020 at 7:42 pm #1169844TomLead DeveloperLead DeveloperNo problem 🙂
February 19, 2020 at 1:46 am #1170014pairfumDear Tom,
Our apologies that we are re-opening this ticket.
The developer of the ‘abandoned cart plugin’, sent us a modified version of his plugin:
https://codecanyon.net/item/woocommerce-abandoned-cart-recovery/24089125We have just uploaded this modified version to our site:
https://www.pairfum.comThe ‘add your email’ pop-up now appears when you click ‘add-to-basket’ from the sticky panel, both for single & variable products.
We noticed, however, for single product pages that although the button states that the product has been added to the cart, the product has actually NOT been added to the cart. This is irrespective of whether you click away the ‘add-to-basket’ pop-up or fill in your email address:
https://www.pairfum.com/product/grapefruit-pepper-black-cedar-eau-de-parfum/The button in the sticky ‘add-to-cart’ panel works as it should on variable product pages:
https://www.pairfum.com/product/reed-diffuser-refill/Can you amend the code of the ‘add-to-basket’ button to also accommodate single products from the sticky panel?
Many thanks for your help on this.
Kind regards,
Pairfum London
-
AuthorPosts
- You must be logged in to reply to this topic.