Open teknoziz opened 7 years ago
Import and export features are likely to remain as add-ons as everyone has different needs (IMHO) .
To handle this though I'd suggest creating a separate add-on that reads a CSV file and adds products based on that data. It would use the API to add in the products, rather than directly using SQL. I've done this kind of thing a lot with CSV files and pages in concrete5, but not yet with community store.
After an import you still might need to associate things like images and categories though, pretty tricky to make an import handle everything.
Getting the product details out of eCommerce is a different matter on the other hand, I'm not sure if there are existing exporters or not.
I am building a template package for a client who is using community-store; and have a plan to use a customized content.xml to import a smallish set of products and pages. Working from the /concrete5.7.5.13/concrete/config/install/packages/elemental_full/content.xml starting point; can you tell me of any reason that this wont work, or perhaps advise a better mechanism for inputting a batch of products?
Thanks
@naishoya I don't think a content.xml approach will work here to import product data, they are custom database tables and we've not written the import/export functionality you'll see through the core on particular sets of data. I'm not even sure if it's possible.
Personally I'd be looking to write my own small import script, something that reads CSV files and programmatically adds new products using the API. I know this isn't documented, but it shouldn't be too difficult to get basic products loaded up.
Thanks, Ive been looking at the db.xml for the custom tables and think you're completely right, it doesn't look possible via a content.xml approach, so i am going to use the content.xml to do other specific page layouts like product categories and organization / layout and then manually put the products in via the shop interfaces in dashboard and use phpmyadmin's export:import function to get it from my locahost to the clients' server. I'm looking forward to a CSV import Export functionality in the community-store core functions in the future, but as this one client only has 45 total products, this wont be too much work.at this point, and since im adding a bunch of custom product attributes it seems more rational.
Thank you for the quick reply.
On Mon, May 15, 2017 at 11:09 PM, Ryan Hewitt notifications@github.com wrote:
@naishoya https://github.com/naishoya I don't think a content.xml approach will work here to import product data, they are custom database tables and we've not written the import/export functionality you'll see through the core on particular sets of data. I'm not even sure if it's possible.
Personally I'd be looking to write my own small import script, something that reads CSV files and programmatically adds new products using the API. I know this isn't documented, but it shouldn't be too difficult to get basic products loaded up.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/concrete5-community-store/community_store/issues/166#issuecomment-301722321, or mute the thread https://github.com/notifications/unsubscribe-auth/AEfdbwtgBoa4nL3-0T-cAcIBpQ2z_YUlks5r6WfmgaJpZM4LaobU .
I am moving from eCommerce under version 6 and would love to move my products over to version 8, but the tedium of adding hundreds of products at a time is a killer. Is there any way, even using SQL, that I can accomplish this?