VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Mike Klimczak on February 24, 2015, 00:36:42 AM

Title: Can I have a product status "published" but not available for sale/add to cart?
Post by: Mike Klimczak on February 24, 2015, 00:36:42 AM
My client has a catalogue of information available to their clients in the form of PDFs. With Virtuemart we sell these PDFs as downloadable items.

Some of the information the have to share with their clients does not have an associated PDF to sell with it, but they still want to be able to display the product data they have in their store but not have an "add to cart" button. At a later time a PDF may become available to apply to the product and it should then become a purchasable product.

In short, is there a way to have a product published but not purchasable?
Title: Re: Can I have a product status "published" but not available for sale/add to cart?
Post by: thewitt on February 24, 2015, 01:13:00 AM
I do that today for a category, using template overrides. You need to set up the override by editing the template to remove the add to cart button, then assign the category temp,ate override in VM
Title: Re: Can I have a product status "published" but not available for sale/add to cart?
Post by: Milbo on February 24, 2015, 09:27:08 AM
Just use inventory feature.

Set vm so, that it does not selll if the stock is emptyl, done. No overriding,
Title: Re: Can I have a product status "published" but not available for sale/add to cart?
Post by: thewitt on February 24, 2015, 14:22:46 PM
Quote from: Milbo on February 24, 2015, 09:27:08 AM
Just use inventory feature.

Set vm so, that it does not selll if the stock is emptyl, done. No overriding,

Which of these choices would you recommend?

I did not want a "Notify Me" button displayed. In my case the product is simply a display page for a product that has to be ordered somewhere else, and not something that will ever be in stock.
Title: Re: Can I have a product status "published" but not available for sale/add to cart?
Post by: zuotoski on March 05, 2015, 21:06:59 PM
Quote from: thewitt on February 24, 2015, 14:22:46 PM
Quote from: Milbo on February 24, 2015, 09:27:08 AM
Just use inventory feature.

Set vm so, that it does not selll if the stock is emptyl, done. No overriding,

Which of these choices would you recommend?

  • Products Out of Stock are orderable, no special action
  • Do not Display Product
  • Do not Display Product, if child products also out of stock
  • Displays 'Notify Me' instead of 'Add To Cart' button
  • Products Out of Stock are orderable, and the field 'Availability' below is displayed

I did not want a "Notify Me" button displayed. In my case the product is simply a display page for a product that has to be ordered somewhere else, and not something that will ever be in stock.

@Milbo... I would like to know which option to choose, too. Could you help us, please?

Thanks :)
Title: Re: Can I have a product status "published" but not available for sale/add to cart?
Post by: AH on March 05, 2015, 21:58:18 PM
I think you could use the "display the notify me" option

Then create a sublayout template override to remove the " notify button "

components/com_virtuemart/sublayouts/addtocartbar.php


$stockhandle = VmConfig::get ('stockhandle', 'none');
if (($stockhandle == 'disableit' or $stockhandle == 'disableadd') and ($product->product_in_stock - $product->product_ordered) < 1) { ?>
<a href="<?php echo JRoute::('index.php?option=com_virtuemart&view=productdetails&layout=notify&virtuemart_product_id=' $product->virtuemart_product_id); ?>" class="notify"><?php echo vmText::('COM_VIRTUEMART_CART_NOTIFY'?></a><?php
} else {