Variants import leads to blank product page.

  • Posts: 52
  • Thank you received: 0
  • Hikashop Business
9 years 3 months ago #210893

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.3.15

I have about 380 products added so far - both main and variants. Main product #381 has a total of 175 variants. If I add the variants manually in the back-end then everything is OK. If I choose not to add the variants manually but rather import a CSV file then the front-end product #381 page is blank, i.e. when I load the product page nothing is displayed. If I delete about 2/3 of the imported variants then the front-end product page displays normally.

Some additional info: I have about 50 custom product fields. Part of the fields are associated with some of the products, others are associated with other products.
One thing I've noticed: When I add the variants manually, all the custom fields in the table hikashop_product that are not related to product #381 are NULL, i.e. the table is normalized in that part - I'm not database pro so I'm not quite sure about the right definition. If I import a CSV file these custom fields are just blank. Could that be the issue or something else? How do I import CSV in order to fill in NULL where necessary.

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

  • Posts: 52
  • Thank you received: 0
  • Hikashop Business
9 years 3 months ago #210894

When I import a CSV file with the variants everything in the back-end looks fine. All the info is correct and the variants are associated with the main product.

Last edit: 9 years 3 months ago by ydingilski.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 3 months ago #210940

Hi,

NULL or blank, that's the same for custom fields so no problem on that.

So you said that you have a blank page on the product page. Is the page completely blank with nothing on it ?
If you turn on the "error reporting" and "debug mode" settings of the Joomla configuration, do you get any error message on the product page ? In that case, what is the exact message ?

If there is a difference, it must come of the way the CSV is done so a small version of the CSV with one or two products and their variants would be great for us to understand the issue.

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

  • Posts: 52
  • Thank you received: 0
  • Hikashop Business
9 years 3 months ago #211122

Hi nicolas,
The page is completely blank. You can see the attached screenshot (in fact the main product with problematic variants is #378). I've enabled Joomla Debug System = YES and Error Reporting = Development, but you can't even see the debug console on the bottom.

Attached are two more files: 1. The CSV file I have imported the variants; 2. Part of the products export after that - you can see main product #378, two more and their variants.

Here is a link to the website: http://filkab.solar/index.php/bg/hikashop-menu-for-products-listing/product/378-extended-warranty
Login: guest
Password: guest

Product #378 is the very last on my listing - it's called EXTENDED WARRANTY.

Please let me know if you need anything else and I'll provide it ASAP. If you need admin rights I'll send you the credentials on a private message.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 3 months ago #211161

Hi,

You're missing a row for the main product in your CSV. It is necessary for the system to properly import the variant. It should be placed on a row before the variants in your CSV and the product_parent_id column of the variants should correspond to the product_code value of the main product.

Then it should hopefully work correctly.
Otherwise, it should be great to get the error message on the white page. If you don't see it with the debug mode activated, then it means that your web server is configured to force them to not display. In that case, the error messages should be logged in the PHP error log of your web server. So please search there for it. If you don't know where your PHP error log is, you might need to contact your system administrator or hosting company for help accessing it.

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

  • Posts: 52
  • Thank you received: 0
  • Hikashop Business
9 years 3 months ago #211164

I created the main product manually before importing the variants so that shouldn't be the problem.
I'll check what's in the php log and post it.

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

  • Posts: 52
  • Thank you received: 0
  • Hikashop Business
9 years 3 months ago #211166

Here is the error from the error_log file:

[10-Aug-2015 12:48:18 UTC] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 655361 bytes) in /home/filkabso/public_html/components/com_hikashop/views/product/tmpl/show.php on line 299

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

  • Posts: 52
  • Thank you received: 0
  • Hikashop Business
9 years 3 months ago #211170

The problem appeared to be low memory limit. I've increased it and now the page is correctly displayed :) :) :)
Apparently 175 variants are a bit more than normal.
PROBLEM SOLVED.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #211173

Hi,

Yes, 175 variants is becoming important ; generally it's around 10-20 variants.
Because HikaShop needs to load all variants while displaying the page, it requires more memory than usual.

If you have more than 50 variants you might need to see if custom fields or options are a better solution.
And managing all these variants might not be easy in the backend.

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.061 seconds
Powered by Kunena Forum