Remove Product?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 anni tempo fa
I would be glad if someone know how to do this:

When a product is out of stock or is unpublished you can still access it by typing the product url, does anyone know how to unpublish the product so if anyone tries to acess it by typing the url he will get redirected to the fist store default page.

Hope to hear from someone:)
14 anni tempo fa
EDITED

sorry, misinterpreted the question - good job andrei replied ...
14 anni tempo fa
1. Open Product.aspx.cs file
2. Replace
if (product == null || product.Deleted)

with
if (product == null || product.Deleted || !product.Published)
14 anni tempo fa
Thanks Andrei!

Exactly what I was looking for, works great!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.