Hello,
What you are describing sounds like something the theme is doing. By default, there is just another button that appears like this: http://cld.wthms.co/UpXy57. YOu’ll see the default behavior if you temporarily switch to a default WordPress theme.
So this is something you’ll need to contact the theme authors about, as the code that generates this is not within WooCommerce core.
Hi
Yes that is what it looks like already on my site. It’s already there by default. I had changed the colours etc.
What I was meaning what is the best way to change it to maybe something completely different like an icon or something else ?
And have it smaller or something. Basically at the moment I have it next to the “Add to Cart” button … and obviously displays once client has clicked on “Add to Cart”.
But when you have 4 products across the page, and if a client clicks on all 4 products to BUY then you have 2 icons for each product (“still the Add to Cart” displaying AND the “View Cart”. If all products clicked doesn’t fit across the screen properly (8 icons altogether because I as the pretend client has ordered all 4 products on the same line).
It gets a bit squishy.. Also on the mobile version also.
So therefore trying to find an alternative method for the “Added to Cart” button to be smaller or something different so it doesn’t take up so much room.
Thx
Kristin
Gotcha. So changing this is possible, but will require some custom code – JavaScript to be specific.
This is where the extra button is currently added: https://github.com/woocommerce/woocommerce/blob/ca317727102560dce7c8a65622ff9301a8f8380e/assets/js/frontend/add-to-cart.js#L96-L114. So could attach a custom event to change this behavior.
Or, you could also take advantage of the fact the main add to cart button has the added class appended to the list once added. So you could do custom CSS to add an icon to the end of .ajax_add_to_cart.added {} for example, then hide the other button.
-
This reply was modified 8 years, 2 months ago by
Caleb Burks.