Score:2

How can I disable products so they are unpurchase-able and also display in a view?

cn flag

I have a view of published products. I want to also create a view of unpublished products, so users can see previous products that were available, but there shouldn't be an Add to cart on these products.

I've unpublished the products and created a view of these. Admin can see the results in the view and when they click on one of them there is still an add to cart to button. Anon users can't see the view results at all.

How can I disable products so they are unpurchase-able and also display in a view?

cn flag
I wouldn't use "unpublishing" for this. Generally, in Drupal, "unpublished" nodes should not be shown unless the user is an admin. Depending on the type of product, you can add a new boolean field such as "available" and then set that to false for the products you are no longer selling, and then configure your view based on that field.
Score:2
it flag

What you do is somewhat dependent on your product architecture, specifically which fields you have at the Product level and which at the ProductVariation level. If all the fields you use in your product displays are at the Product level, you can simply disable the ProductVariation and leave the Product published. There will no longer be an Add to Cart form on the display, and everything else will remain the same.

Use a little trial and error to see what works for you. You may need some additional site building or theming in the case that your displays are dependent on fields injected from the ProductVariation into the Product display.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.