Tagged: add to cart button
-
AuthorPosts
-
May 22, 2015 at 1:23 am #448108
Hello everyone, was reading the many posts about people asking about having the add to cart button to always show on the product page with variations. Go to your quick css and add this code.
.single_variation_wrap{display:block !important;}
This will always make the add to card button to show when no individual variation is set. If a customer clicks on the add to cart without a variation selected, the page will reload and tell the customer to “Please choose product options…”. I
If there is a way for anyone with some better css skills to enable a popup for the customer to please choose an option instead of having the page reload please feel free to add the code!
With ecommerce we have to remember, we need to create dummy proof ways for people to buy. Anyways, having the add to cart button always visible will help customers to understand it is for sale and will also increase your sales. thanks
May 23, 2015 at 7:09 am #448957Hey Austin!
Thank you for using Enfold and the tip. You can actually set a variation as a default. This screenshot is from an old version of the plugin but the location of the option hasn’t changed:
http://cld.wthms.co/7LIv
http://cld.wthms.co/YQFOBest regards,
IsmaelMay 23, 2015 at 8:45 pm #449108That is true, however if your someone like me who uses multiple images per variation plug in then non of my other images for the product show up. This allows all images to show as well as the add to cart button when the page loads for the visitor. Thanks
May 24, 2015 at 4:30 am #449174Hi!
OK. The featured images for each variation displays fine when you’re not using a plugin. Try to add this in the functions.php file:
add_action('wp_footer', 'ava_custom_script', 10); function ava_custom_script(){ ?> <script> (function($){ $('div.variations_button .button').click(function(e) { if($('#top .variations select')[0].selectedIndex === 0 ) { e.preventDefault(); alert('Please choose product options…'); } }); }(jQuery)); </script> <?php }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.