cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove a product from the portal e.g., electronics/powertools site without the product being actually deleted from the Database

Former Member
0 Kudos

Hi Friends,

My requirement is, I want to simply remove a product from the portal that is running, for example, electronics/powertools product so that it would not show up in the portal anymore when a user browse it. The reason could be unavailability or discontinuation of the product. At the same time, it's an imperative requirement that the product should not been deleted from the database even after I remove it from the portal.

Please suggest whether there any way to achieve this.

Thanks, Soukhin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You are best to use a status attribute on the product which you can incorporate into the flexible search query of a restriction (e.g. show me products that have a new 'visible' attribute on product set to 'no').

Remember to also include this in the Solr indexing queries so that these products don't come back in search results.

Rather than introducing a new attribute, you could also use the 'Approval' flag which is used to show whether something is synchronized, but then... how do you get that status into the 'online' catalog from the 'staged' catalog? You'd have to set it directly in the 'online' catalog.

Former Member
0 Kudos

Hi Simon, I had tested by changing the approval status to 'unapproved' in the online catalog from the hMC, but it did not worked out. The product is visible in the site. Please suggest if I'm missing something.

Answers (4)

Answers (4)

Former Member
0 Kudos

You have to write a custom logic .Mostly in a RemoveInterceptor on deletion and do the required changes ,in this case change the product approval status to Unapproved.

Former Member
0 Kudos

Juan and Simon, I have concluded this from your suggestions, am I right in this? But the question is, should there be any logic written to get that input? I mean the system should be informed that a deletion is done and by virtue of that, it would change the status flag?

Former Member
0 Kudos

When product get deleted, 'approved' status of the product changes to 'unapproved' and it will no longer be available in the 'online' catalog and also at the same time, in the portal. I'll have to write a logic simply when it takes the input from the front end, the status changes and is persisted in the DB, but the status should change only for the deleted product, not for all the products.

Former Member
0 Kudos

Hi Soukhin,

If you change the approval status of the product to unapproved will not be longer available. Hybris manage unapproved status like a logical deletion from the db but still on the db.

Regards

Former Member
0 Kudos

Hi Juan, I've tried changing the approval status to unapproved both from hMC and impex import but the product is still appearing in the portal, am I missing something?

0 Kudos

Hi,

Make sure that you have this approval status restriction to your solr indexing query. Re-index after changing the status.

Regards, Chaitanya