Remove Product?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 14 años
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:)
Hace 14 años
EDITED

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

with
if (product == null || product.Deleted || !product.Published)
Hace 14 años
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.