6 replies [Last post]
liquid's picture
Offline
Joined: 08/14/2007
Juice: 32
Was this information Helpful?

Hello,

I'm new to using the Drupal CMS and was happy to find this module to add to a clients site. For now they want just the products and description to show. I've figured out how to turn off the displays for pricing and what not... but is it possible to disable the 'add to cart' button?

any help would be appreciated.

Shawn Conn's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 919
theme_uc_product_add_to_cart

theme_uc_product_add_to_cart (uc_product.module), setting that to display nothing would remove the add to cart button to product pages. As far as the catalog, theme_uc_catalog_products (uc_catalog.module) uses tapir to build the table found in uc_product_table (uc_product.module). If you disabled the last column in that table it would remove the add to cart buttons.

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

liquid's picture
Offline
Joined: 08/14/2007
Juice: 32
Re: theme_uc_product_add_to_cart

thanks for your direction, the button is now gone on all product pages.

Shawn Conn's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 919
Re: Re: theme_uc_product_add_to_cart

Maybe you need to clarify your goal. Do you only need some products disabled? When you said "disable add to cart" button I interpreted that as you don't want the button there at all. If you just want a certain set of products with the button disabled, you can put some code in theme_uc_product_add_to_cart that will only render the button for a certain products.

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

liquid's picture
Offline
Joined: 08/14/2007
Juice: 32
Re: Re: Re: theme_uc_product_add_to_cart

No I really meant thankyou! For now this is what I need. My client wants to only display his products like a catalogue and later on may want to be able to sell his stuff online.

Shawn Conn's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 919
Re: Re: Re: Re: theme_uc_product_add_to_cart

Heh, I guess I should look more closer next time I read posts. I could of swore that you said ",but the button" as if there was a problem. I'm glad I could help!

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

fmesco's picture
Offline
Joined: 09/01/2007
Juice: 24
Render button only on certain categories

Hi Shawn, I came across this post looking for a similar fix for my client who sells online courses. Some of the courses are free, and we've implemented the Signup module to handle the registration process, but we've put up with the Add to Cart buttons on the courses in this "free" category. Could you explain to me what I would need to do in the theme_uc_product_add_to_cart that would eliminate the Add to Cart button on only those products?

Thanks!