Product in PHPmyAdmin but not in the administrator

  • Posts: 147
  • Thank you received: 6
9 years 7 months ago #196587

-- HikaShop version -- : 2.3.5

Hi,
I have being trying upload products via CSV and I have being getting a message that the product already exists.
When we go into the administrator/hikahsop/products and search for the product hikashop can't find it.
Yes, I trying all the filtering options, 'all sub elements', direct sub-elements, etc.

The funny thing is, if I search it using PHP my admin I can see the product there, but for some reason it doesn't appear in the Administrator. Quite annoying.

Any help to fix this will be very much appreciated.

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #196591

Hi,

Please update to the latest HikaShop version (2.4.0) and use the "check database" button that you will find in the toolbar while displaying the HikaShop configuration.
The "check database" will perform some test in the database structure but will also look at products without any category assigned (and will fix them).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 147
  • Thank you received: 6
9 years 7 months ago #196668

Hi Jerome,
I updated to the 2.4 and Joomla to the latest 3.4.1. Unfortunately that didn't solve the problem.
When I press the 'check database' button it comes back with all 'ok' in green.
I then go back to the products and search for product name but nothing comes up. I also looked for product code and no lucky.

- Getting a bit frustrated with this, please help.

On another question
- Are images reordered in any way when the csv is imported? I have a logo that I always place at the end but when I import the CSV they get moved to first.

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #196679

Hi,

Then the products must be found when you search them.
Please provide an example of product code you're searching, a screenshot of the database where you find the code in the product table, a backend access to your website and a link to this thread via our contact form:
www.hikashop.com/support/contact-us.html
We'll check the issue.

The images are inserted in the order you put them in the CSV but they all have the ordering 0, unless you have in your CSV an images_ordering column where you enter the ordering of each image separated by the same separator you use in the images column.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #196948

Hi,
I checked your backend and found the entry. However, that entry is not stored as a product but as a variant in your database and it is not linked to any parent product. So the system cannot find it as it is looking at all the products and variants of the current category or its sub categories and that your variant is not linked to any category (or to any product with a category).
So this means that there is a problem with the data of your CSV for that product as the system identify it as a variant, not a product.

I also tried an import of the CSV you sent regarding a potentially description import issue but couldn't reproduce the error you were talking about. The two products imported just fine with the latest version of HikaShop. I suppose that you weren't using that CSV when you got the issue.

Please Log in or Create an account to join the conversation.

  • Posts: 193
  • Thank you received: 76
9 years 7 months ago #197011

To create unlinked variant in database:
1.Import variant with non-existing value for characteristic
2. Delete characteristic from main product

Import this data to demo:

product_parent_id;product_name;product_code;product_type;categories;Color
0;Crocks;Crocks;main;product category;Blue
Crocks;Linked;Crocks_1;variant;;Blue
Crocks;Unlinked;Crocks_Other_9999;variant;;PinkyGreen

1. Open product Crocks
2. Go to manage variants
3. Open both variants in new browser tabs
4. In first tab go back to main product and delete characteristic color, than save and close.
5. Refresh both tabs with variant. The variant with name "Linked" is gone(empty form), but variant with name "Unlinked" is still present.

If you add the same characteristic to main product again, the original "Unlinked" is gone, but all variants have the same name and product_code starts with "Unlinked" product's code instead of product's code of parent.

This bug is present from 2.3.4 and I have fix against 2.3.5 if necessary.

There were 2 other ways to create unlinked variant with no parent , but I hadn't time to test it on 2.4 yet.

Please Log in or Create an account to join the conversation.

  • Posts: 147
  • Thank you received: 6
9 years 7 months ago #197020

Hi guys thanks for the reply.

I got a bit lost with both answers so I will split it to clarify.

Nicolas I checked your backend and found the entry.
How did you find the product/variant through the administrator though? This was the problem. When I went to Products, typed in the product name in the search/filter option, didn't select any category and selected ALL (Products and Variant). But the search/filter didn't find anything (as you could see in the screen shots I sent to you). So how did you find it? I actually want to find it though the administrator so I can manually fix it.

korzo
You are just saying it is a bug and needs fixing? Is it correct?

Thanks guys

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #197055

Hi,

@korzo : I don't consider that as a bug since you're doing something which is not correct at the start.
In both cases, you're not supposed to do that. And in any case, even if you do it, it won't be much of a problem. You'll just have a variant laying around in the product table but it won't create an error or anything. HikaShop will just ignore it.

@maujbigo : I edited another product and changed the id in the URL in the address bar of my browser to to id of the variant that I could see in the screenshot of your database. You won't be able to "fix" that via the normal interface as the normal interface ignores such entry with invalid data (as I explained above to korzo).
What you can do is go in the menu System>Mass actions, create a new mass action with a "product columns" filter on the column "product_id" and the value being the product_id of your variant (as you can see in phpmyadmin, and with an action "update the values" with the column "product_type" changed to "main" (with "string" in the type dropdown). Then, click on the process button.
Then, you can run the "check database" button again and it will link that product with the main category of your shop and you'll be able to find it when you search for it.

Please Log in or Create an account to join the conversation.

  • Posts: 147
  • Thank you received: 6
9 years 7 months ago #197348

Hi Nicolas,
Thanks for your explanation.

I can't really leave that variant lying around in the database as when I try to import the CSV with a version of the product using that same product_code it skips the import process. For now I will delete it straight from the database.

I do understand what you are saying about not creating the CSV properly, and I am making a note here so all the products in the CSV must have a type, must have a category and if a variant must have a parent.

But as you probably know human errors happen or for example a new employee, not so experience could forget one of the values and that would cause the problem.

In this case I have access to the database and can edit it in PHPMyAdmin but you must agree we don't want anyone playing around with the DB. So allowing employees to edit that is not an option.
The mass action requires a number of steps to simply find/edit a product.

Just as a suggestion maybe for a next version if possible it would be good if we could find any product in the _hikashop_product table.

This would be a simple case of searching the product in the administrator, open it, changing it, save and Done.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #197366

Hi,

I understand your last request but it's not something possible.
There are more than "main" and "variant" product types, there are also "template", "approval" and there will be soon some new product types for the product history/validation.
Displaying all products when having some "product history" is just not possible ; the users won't understand anything and they shouldn't have the right to edit most of them.

HikaShop let other components (like HikaMarket) to create new product types, and it's really a good thing for flexibility and new feature implementations.
But in the same way, that's sure that it forces you to be more careful with product import.
The good news is that the product import will be improved in the future, I need an import in HikaMarket (but it will need some time, it won't be in the next release) and this new import will be added in HikaShop afterwards.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum