Jump to content


Photo
WooCommerce for PageLines

WooCommerce Select Option button



Best Answer ellenmva , 18 April 2013 - 04:49 PM

There is no way in the settings but there is a hook that you can use to remove the buttons.  You would add this information to the functions.php file either in a child theme if you are using one or by installing the Pagelines Customize Plugin (free in the store) and putting this code in the functions.php file.

 
add_action( 'woocommerce_after_shop_loop_item', 'remove_add_to_cart_buttons', 1 );

function remove_add_to_cart_buttons() {
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
}

Hope that helps.

 

Ellen

Go to the full post


  • Please log in to reply
6 replies to this topic

#1 pspr

pspr

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 17 April 2013 - 04:11 AM

Hi, I am using WooCommerce for my e-commerce store. I am having trouble deleting the select option button from my page. How could I remove that button. It's under the price of the product.

 

This is the link to the page. http://www.headedfor...greatness-stor/

 

Thank you,

 

Seena Khoee



#2 ellenmva

ellenmva

    Advocate

  • Members

  • 314 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 17 April 2013 - 02:21 PM

Hi Seena,

 

To hide the Select button try this code. Put it in Pagelines --> Site Options --> Custom Code --> Custom CSS/LESS

 
.post-type-archive-product #page a.btn {
  display: none;
}

That will hide the Select buttons (or Add to Cart if it isn't a variable product) on the product archive page.

 

Ellen



#3 pspr

pspr

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 17 April 2013 - 10:22 PM

Thanks for your help Ellen. Is there any other way I can hide the select buttons. Because when I use that method, while the pages load, the buttons are shown for a couple seconds then they are hidden.

 

Is there anyway I can remove that feature from the settings?



#4 ellenmva

ellenmva

    Advocate

  • Members

  • 314 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 18 April 2013 - 04:49 PM   Best Answer

There is no way in the settings but there is a hook that you can use to remove the buttons.  You would add this information to the functions.php file either in a child theme if you are using one or by installing the Pagelines Customize Plugin (free in the store) and putting this code in the functions.php file.

 
add_action( 'woocommerce_after_shop_loop_item', 'remove_add_to_cart_buttons', 1 );

function remove_add_to_cart_buttons() {
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
}

Hope that helps.

 

Ellen



#5 pspr

pspr

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 18 April 2013 - 04:53 PM

I am using the base theme. Is that the same thing as a child theme?



#6 pspr

pspr

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 18 April 2013 - 11:16 PM

Actually it worked. Thank you very much.

 

I have one last question. I made the price $26.00 but on my store page. It's showing the price as $26. I also want the 00 to show as well. Is it possible I can set it up so the entire price is showing?



#7 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts
  • LocationWV
  • Country: Country Flag

Posted 19 April 2013 - 01:54 PM

Closing this since you opened a new topic about your new question.







Also tagged with one or more of these keywords: WooCommerce for PageLines