Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #251943

    My products are simple without variations so options button is redundant also don’t want add to cart functionality as user should first go to product single page before adding to cart.

    Is there a function to remove these and only have ‘Show Details’ link ?
    Thank you!

    • This topic was modified 10 years, 7 months ago by ttem.
    #252504

    Hey ttem!

    Yes – open up wp-content/themes/enfold/config-woocommerce/config.php and replace:

    
    	ob_start();
    	woocommerce_template_loop_add_to_cart();
    	$output = ob_get_clean();
    
    	if(!empty($output))
    	{
    		$pos = strpos($output, ">");
    
    		if ($pos !== false) {
    		    $output = substr_replace($output,"><span ".av_icon_string('cart')."></span> ", $pos , strlen(1));
    		}
    	}
    

    with

    
    $output = '';
    

    Regards,
    Peter

    #252532

    Thank you Peter that successfully removes the ‘select options’ link

    There was still a redundant delimiter so I removed this from line 213:
    if(empty($extraClass)) $output .= " <span class='button-mini-delimiter'></span>";

    Now the ‘Show Details’ link is floated right…what is the best way to get it centered?

    #252791

    Hey!

    Can you post the link to your website so we can take a look?

    Cheers!
    Yigit

    #252868

    Yigit,
    I think I have it figured since I will only have one button ‘Show Details’ for all products, I changed the following width from 49% to 100%
    #top .avia_cart_buttons .button {width: 100%;}

    That now centers the ‘Show Details’ button..regardless of this css
    #top .avia_cart_buttons .button:last-child { float: right;}

    Should be ok?

    #252888

    Hey!

    Yes it should be ok. If you see any styling issues, let us know!

    Cheers!
    Yigit

    #271045

    hi there,
    same goal here – except i would like to have both ‘add to cart’ and ‘show details’ removed.
    where would i do that?

    thanks in advance
    Pedro

    #271172

    Hi!

    Please add following code to Quick CSS in Enfold theme options under General Styling tab

    .avia_cart_buttons { display: none !important; }

    Cheers!
    Yigit

    #397253

    I also would like to remove all Add to Cart buttons
    I have added .avia_cart_buttons { display: none !important; } to the Quick CSS under General Styling tab but the red add to card button is still there. what to do?

    #397580

    Hey!

    Please add following code to Quick CSS as well

    button.single_add_to_cart_button {
    display: none !important;
    }

    Cheers!
    Yigit

    #567300

    The quantity button is still added with this option. How do I remove that as well?

    #567303

    @cinchmedia: why would you want to do that? just want to sell one single product at a time or don’t you want to sell a product at all (f.e. just for promotion purposes..)?

    #568204

    Hey!

    can you provide us a link to your site showing the elements in question please? we need to be able to inspect the elements.

    Best regards,
    Andy

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