Author Topic: Remove "Add to cart"-button on some products  (Read 9186 times)

maceide

  • Beginner
  • *
  • Posts: 1
Remove "Add to cart"-button on some products
« on: January 25, 2013, 21:42:39 pm »
Hi,

I am constructing a site/store wich mostly is going to be used as kind of a catalouge. The idea is to disable the "Add to cart"-button on those items that are just for display, but yet keep the price viewable. Is there any way of having this sort of functionality? That way we can show peapole all are products anc prices, but not have it all for sale.

Does anyone know of this?

Best regards,
Andreas

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28337
  • Always on vacation
    • Jenkin Hill Internet
Re: Remove "Add to cart"-button on some products
« Reply #1 on: January 26, 2013, 15:09:06 pm »
If you select Use only as catalogue  in configuration/shop the prices are shown with no add-to-cart for all products.

If you need to incude the add-to-cart function for certain products only then you can use a template override for productdetails with the cart code block removed for those that are catalogue products. You can select the overrides to be used by category of for individual products.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29

chicago

  • Beginner
  • *
  • Posts: 7
Re: Remove "Add to cart"-button on some products
« Reply #2 on: March 01, 2013, 13:07:44 pm »
If you select Use only as catalogue  in configuration/shop the prices are shown with no add-to-cart for all products.

If you need to incude the add-to-cart function for certain products only then you can use a template override for productdetails with the cart code block removed for those that are catalogue products. You can select the overrides to be used by category of for individual products.

I've located the code which displays the 'Add to Cart' button in the product view, and have successfully 'removed' the block of code to give me a product view without 'Add to Cart' button.

How do I associate this new .php file with specific products (as an override)? where would I save the file? what would I call it?

Thanks for any help you can give

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28337
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29