vuestorefront / mage2vuestorefront

Magento to Vue-storefront datapump - synchronizes Products, Categories and Product-to-category links between your Magento2 API and NoSQL database of vue-storefront

Home Page:http://vuestorefront.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't import bundle products

jahvi opened this issue · comments

For some reason I can't get bundle products to import all the way, they do get imported partially but I always get an error at the end of the import process.

Steps to reproduce

  1. Clone repo
  2. Run npm install and docker-compose up -d
  3. Change config.js magento settings
  4. Run import commands in order up to node --harmony cli.js products --removeNonExistent=true --partitions=1

Expected Result

All products should be imported

Actual Result

Getting the following error when it tries to import bundle products:

debug: Response received.
debug: Calling API endpoint: GET http://magento.test/rest/V1/configurable-products/BCOMP/options/all
debug: Response received.
error: API call failed: Only implemented for configurable product: BCOMP
2018-11-12T21:47:54.126Z - error: Only implemented for configurable product: BCOMP

The bundle product doesn't have anything special as far as I can tell, all I did as a test was:

  1. Create new bundle product
  2. Change name and SKU
  3. Create a single option
  4. Associate 2 single products to that option
  5. Save

I'm wondering if it's got anything to do with the script using the /V1/configurable-products even thought it's not a configurable product.

OK it seems like we just need to check if the product is other type than configurable: not call /V1/configurable-products
If You could change it on Your own and report Pull Request - that would be perfect.

I'll try to give it a go!

Ok this is getting confusing now, I started implementing a fix for this which lets the import finish without errors but when I open the VS frontend using this DB I was still getting errors in the console when trying to navigate to the bundle product.

So I though maybe there was a problem with my M2 DB, so I ran the sample test_fullreindex to see if that one worked since that one includes a bundle product. However with and without my fix I was still getting issues in the frontend because of missing "product links":

Console: when searching for "Sprite Yoga Companion Kit"

screen shot 2018-11-13 at 6 55 58 pm

"Sprite Yoga Companion Kit" product page, see all simple products are missing

screen shot 2018-11-13 at 6 56 34 pm

Strangely the same product in the VS demo page works fine, which I assume was imported from the same source? Were these product imported differently?

I feel like this one might be user error but I'm not sure what I'm doing wrong.

OK, so I've removed configurableOptions import for bundle products:
53538e1

I ran "test_fullreindex.sh" + "npm run db rebuild" (in vue-storefront-api)
screenshot 2018-11-14 14 42 00
on clean db. After all it seems that bundles works just fine. Please do retest.

Thanks! It works for me now as well.

I do get these errors in the console when I visit the bundle product page but everything works so not sure if they matter.

screen shot 2018-11-14 at 7 11 13 pm

That’s great! These messages come from monitoring mechanism and show the response time of innoDb (if longer than 800ms) - it’s nothing critical