products deleted, but still in the database

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 9 años
hi

I have deleted the product , but they are in product table with a field "deleted" made TRUE.. why?

how can I do to deleted definitively?

BR
Hace 9 años
cicciuzzo wrote:
hi

I have deleted the product , but they are in product table with a field "deleted" made TRUE.. why?

how can I do to deleted definitively?

BR


nopCommerce uses soft-delete, this is normal. ;)
Hace 9 años
The problem is that in the Specification Attributes ... it is seen that there are associated with specific products that there are not more ...

Number of associated products (10) but in reality the products are only 3. (this not correct)

I did a view in the DB and I found all the products deleted.

is there a way to do general cleaning?
Hace 9 años
cicciuzzo wrote:
The problem is that in the Specification Attributes ... it is seen that there are associated with specific products that there are not more ...

Number of associated products (10) but in reality the products are only 3. (this not correct)

I did a view in the DB and I found all the products deleted.

is there a way to do general cleaning?


I have not looked into this, perhaps that's a bug. But nopCommerce usually will only retrieve not-deleted items, so there might be a bug that did not account into this. You might want to file a report on CodePlex. :)
Hace 9 años
wooncherk wrote:

I have not looked into this, perhaps that's a bug. But nopCommerce usually will only retrieve not-deleted items, so there might be a bug that did not account into this. You might want to file a report on CodePlex. :)



there is a way to do cleaning this products and all relations with all the table?
Hace 9 años
If you want to delete a product from Product table permanently,
add this line at the bottom to :


\Libraries\Nop.Services\Catalog\ProductService.cs

        public virtual void DeleteProduct(Product product)
        {
            if (product == null)
                throw new ArgumentNullException("product");
            
            //delete product
            product.Deleted = true;            
            UpdateProduct(product);


            // ADD THIS LINE BELOW  (permanately deletes the product) :
            _productRepository.Delete(product);            
        }

Hace 9 años
cicciuzzo wrote:

I have not looked into this, perhaps that's a bug. But nopCommerce usually will only retrieve not-deleted items, so there might be a bug that did not account into this. You might want to file a report on CodePlex. :)


there is a way to do cleaning this products and all relations with all the table?


if you are good at SQL, why not? :D
Hace 9 años
Because (I think), if you have order items that reference those products, you've just created widows.
Hace 7 años
Suggested solution here is wrong. There are other tables in database that can have information related to the product like: attributes, combinations, images, store mapping and maybe more.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.