Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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

    #448957

    Hey 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/YQFO

    Best regards,
    Ismael

    #449108

    That 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

    #449174

    Hi!

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.