Slow save times in HikaShop but not in Joomla

  • Posts: 84233
  • Thank you received: 13675
  • MODERATOR
9 years 2 months ago #241993

Hi,

Well, Xavier tried from his computer at work, and I tried from my computer at work, and from my computer at home.
In all the cases, it didn't work.
I tried writting the password, copy/pasting it, nothing changes.
It still says 530 Login authentication failed
And that means that either the password or the login you provided is wrong.
Could you send it again ? Maybe there was a typo when writting the email ?

We could potentially do it with a file manager like the one you one one cPanel, or with a file manager extension like extplorer.

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

  • Posts: 78
  • Thank you received: 0
9 years 2 months ago #242114

I'm chatting with service provider.
Try using ftp.airsoft-hq.co.za as the host name.

I have given them your IP address to check as well.
I sent an email in reply to yours with all other details (same as before)
They also said your IP address is definitely not blocked.

Password I sent you is correct - check it is all lower case and no spaces included in copy and paste.

They have also allowed geographical FTP for France. Please advise if you are in another country.

If this doesn't work, Are you on skype or whatsapp that we can talk live at all just to get this sorted out?

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

  • Posts: 84233
  • Thank you received: 13675
  • MODERATOR
9 years 2 months ago #242126

Hi,

Ok, I was able to connect to the FTP.
The issue is this:
While you may have only around a thousand products in your database, you have around 9 millions variants in there.
And the variants are stored together with the products.
So you must have a few number of products with an enormous amount of variants that were created because you've added too many characteristics with too many values in the product.
A product with so many variants can't be used anyway, so you'll have to delete them.
But you won't be able to do it through the interface, it would just crash because there is too much data to process.
You'll have to go through your phpmyadmin and delete the elements in the hikashop_product that shouldn't be there.
even with a hundred variants per product, you would have 100 000 elements in that table, so you have to delete about 99% of the elements in it.

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

  • Posts: 78
  • Thank you received: 0
9 years 2 months ago #242256

Great so we are making progress - phew!

Now, I do not know too much about this but it is raising a few questions.
Obviously I have not created 9million variants so how did they get there? I obviously cannot see them in the HikaShop backend and they are not displaying on the front end. Some sort of glitch must have created them so how do I prevent it happening again?
I did pick up that there were some strange entries like this on mass actions.

I am in the phpmyadmin and went to air_hikashop_products as you suggested, what exactly do I delete?
Where are these variants in air_hikashop_product?
I do have some legitimate products with variants. How do I distinguish between the legitimate variances and the bogus ones that need to be deleted?

Should I first export and save a csv file as a backup before I start?
Please walk me through this step by step.

PS
I have just done an export of a csv file and it seems that 1 particular part number is duplicated a million times. KA-SL-1821-[variant]
This product can actually be deleted altogether. We no longer stock it.
I have deleted it in the back end.
Another product is KA-FL-02 that has numerous copies but don't seem to be variants. There is no variant showing on the admin backend.
Another is E024 khaki, green and black variants.
These 3 make up about 580,000 lines on the csv file.

Last edit: 9 years 2 months ago by MoverShaker.

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

  • Posts: 84233
  • Thank you received: 13675
  • MODERATOR
9 years 2 months ago #242262

Hi,

1. They got there because you created them. It's quite easy. For example, create a product and add 6 characteristics with 10 values each. With old versions of HikaShop, with the option to generate variants automatically activated it would create a million variants for these. With recent versions of HikaShop, you would have to add yourselfs the values of all the characteristics when clicking on the "add variants" button of the Variants tab. So it's still possible to easily generate so many variants for a product, but it's a more conscious process.

2. You can theoretically see them on both the frontend and the backend. If you edit a product with the variants, you can go in the Variants tab and see them, same on the product page. But since a million elements is too much to load, the product edition page or product details page will just crash and you'll get a blank page.
If the product page displays fine, it means that the product you're working with is not the culprit.

3. There is no glitch which would create them. It has to have been done by someone on your end, not knowing what he was doing.

4. I don't know what you have to delete exactly.

5. Yes, the data is in the table hikashop_product

6. That's the hard part.

7. You would be able to export a CSV file of all the products.
But yes, please do a backup before starting just in case.

You'll have to check the data in the hikashop_product table. Try first to look at an entry in the middle and pick it randomly. There is a 99% chance that it is an entry you don't need.
For example which such query:
SELECT * FROM air_hikashop_product WHERE product_id=1000001
Look at the product_parent_id column of that element.
That will give you the product_id of the main product corresponding to that variant.
Then, run this query:
SELECT * FROM air_hikashop_product WHERE product_id=XXX
where XXX is to be replaced by the product_id of the variant you got above.
That will give you a product_name and product_code that you can search in your backend/frontend.
You'll be able to confirm that you can edit it or display its product page.
So you'll want to delete it and all its variants. You'll be able to do that with such query:
DELETE FROM air_hikashop_product WHERE product_id=XXX OR product_parent_id=XXX
And that should remove the million entries associated with that product.
Rince and repeat the process until you have a decent amount of entries left in the hikashop_product table.

The following user(s) said Thank You: MoverShaker

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

Time to create page: 0.062 seconds
Powered by Kunena Forum