A more elegant solution for discontinued products and also products that might not be available for a long time.

This was written as a guide for a client but can be used and adjusted with your own knowledge and preferences

There are 4 parts to this.   In the future you will only need to configure the product as the other 3 steps will always be active.

This assumes you have an attribute with Stock Availability set as a multiselect or dropdown and that attribute can be used for promo rules.

1) Setup Cross-Sells that show on discontinued and unavailable products

If somebody lands on the product we want them to see the product is not available but also see the other options.

  1. Using Aheadworks Automatic Related Products create a new Rule
  2. The position for the block should be Product page. Content top
  3. The priority needs to be 1 to make sure it works above all other rules
  4. Where to display should be set to products where the availability is one of discontinued or currently unavailable
  5. What to display should be products in the same category and same attribute set that are not discontinued or currently unavailable
  6. How to display you can configure to what you like

2) Configure the product so it can be seen but not shopped

  1. Make sure the product is enabled
  2. Set the visibility to Search so you can only find it from Google https://cl.ly/220d14be9afc
  3. Set the availability to Discontinued or Currently Unavailable https://cl.ly/220d14be9afc
  4. Under the design section, we are going to to a layout update that will remove some parts of the page https://cl.ly/02dac0c8b770 Add this snippet of code to the layout update box
  5. Save and then clear your cache

<referenceBlock name="product.price.final" remove="true"/>
<referenceBlock name="product.info.addtocart" remove="true"/>

NB You can do this process one product at a time, on bulk from the product dashboard, by import or using mag manager so can be applied to all 600 products at once.

3) Setup search to not return discontinued or currently unavailable products

Configure your search module so it does not return products with the attribute values you are using to indicate unavailability.  If using Algolia you will need to create an observer and use a custom back end event.

4) Update your shopping feeds

If you are sending a feed direct to Google shopping for example ensure you have removed products that are unavailable. You may already be doing this by stock availability but if you do not manage stock you probably wont want to be paying to send traffic to archive pages.