0

Such a weird thing has happened in my commerce kickstart 2 store. Somehow some products are in database but have not product variations and have not Title, so I can't display them in backend to remove them.

Is there a way to display those products in backoffice or I will have to delete directly in database? If so, is safe to remove them only in products table?

UPDATE:

I went inside database. I figured out that products that are not displayed in back-end search have not product variations anymore. Most of these products had Title Field and I could delete them by searching in front-end, clicking in Title link - this took me to node page's product. But now there are a few ones that have not Title. In front-end searching display them, but there is not a link to view node's product. So I think what I have are nodes without product variations. And the question What I do to deleted them remains.

2
  • Touching the data base is not safe xD. It is possible but u have to take all in, i mean, references from fields attached to the product entity, orders entities, RMAs, shipping and so on. Maybe with some custom code you can delete them all using the Commerce API (Would be safer) but by the other hand, maybe put some time in why the products display vanished Aug 26, 2016 at 12:57
  • Thanks @GianniDiFalco. I updated question to explain better. Maybe Commerce API solves my problem. But as I explained in UPDATE: answer section, what I have in database are nodes that does not refer to any product variation. So, Commerce API can delete only nodes?
    – Caco
    Aug 26, 2016 at 16:57

1 Answer 1

0

I'm not working on Kickstart as I prefer to have a custom install of Drupal Commerce.

Commerce concept is that each product you create is a variation and you can use those variations in a display (content type)

If you can't see and delete products in the products list, you can create a view (page) displaying commerce products in admin mode (page url : admin/my-view). Then add fields like : product id, sku, title and commerce product delete link.

But it's really strange to have products without title in yourdatabase... because you can't create product without title.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.