Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing tier prices #132

Closed
ktruehl opened this issue Mar 11, 2019 · 15 comments

Comments

2 participants
@ktruehl
Copy link

commented Mar 11, 2019

Hi! Quick question. Is it currently possible to import tier prices with M2IF? If yes, how?

@wagnert

This comment has been minimized.

Copy link
Member

commented Mar 11, 2019

@ktruehl Actually not. But it seems that only one table is affected. So if you'll send me you file, i can check how long it'll took to implement it :-)

@wagnert wagnert self-assigned this Mar 11, 2019

@wagnert wagnert added the enhancement label Mar 11, 2019

@wagnert wagnert added this to ToDo in M2IF Mar 11, 2019

@ktruehl

This comment has been minimized.

Copy link
Author

commented Mar 11, 2019

It's OK. The thing is that we're a bit pressed for time and I don't want to rush you. I'll write a subject that does the job, and then I can send you the code. But thanks for the offer.

@wagnert

This comment has been minimized.

Copy link
Member

commented Mar 11, 2019

@ktruehl Perfect, i think it would be possible to implement it till mid next week, but it'll be well appreciated if'll make a PR :-)

@ktruehl

This comment has been minimized.

Copy link
Author

commented Mar 12, 2019

It would make sense, however, to have it consistent with the rest of the import syntax. What should the format of the column or columns be? For me it doesn't matter. I can bring our data into nearly any format.

@wagnert

This comment has been minimized.

Copy link
Member

commented Mar 12, 2019

@ktruehl I would suggest the default format provided by Magento wich looks like

sku tier_price_website tier_price_customer_group tier_price_qty tier_price tier_price_value_type
sku123 base General 2 10 Fixed
sku124 All Websites [USD] ALL GROUPS 3 15 Discount

If that would be possible, it'll be well appreciated :-)

@ktruehl

This comment has been minimized.

Copy link
Author

commented Mar 12, 2019

That's perfect. I pretty much have it in that format in any case.

@ktruehl

This comment has been minimized.

Copy link
Author

commented Mar 12, 2019

Hm. Actually not quite. If we have several tier prices, these need to be represented in a single row of the product imports file. So do we do it like this?

tier_price_website tier_price_customer_group tier_price_qty tier_price tier_price_value_type
All Websites,All Websites,All Websites ALL GROUPS,ALL GROUPS,ALL GROUPS 2,5,7 25,20,15 Fixed,Fixed,Fixed
@wagnert

This comment has been minimized.

Copy link
Member

commented Mar 12, 2019

@ktruehl Ok, i understand. You'll import tier prices with the product import itself. The idea in general would be to to write an Observer that exports the tier prices (each in a row) to a new file with the structure from above (to be conform with the Magento standard) and implement an Observer/Subject that finally imports the data that has been exported before, e. g. like the variants works.

@wagnert wagnert moved this from ToDo to Selected in M2IF Mar 14, 2019

@wagnert wagnert moved this from Selected to ToDo in M2IF Mar 25, 2019

@ktruehl

This comment has been minimized.

Copy link
Author

commented Apr 12, 2019

Hello again! Took me a while. So, I implemented the tier price import, but due to severe time constraints I had to focus on just getting it to work for our client. In effect that means that my implementation requires the Enterprise Edition and makes a number of assumptions, which might not be appropriate for the general case. I did, however, try to follow your coding style as much as possible. It should be possible for you to use most of the code as is. Let me know if you have any questions.
Archiv.zip

@wagnert

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

Thanks a lot!! I’ll check it next week an come back to you if i’ve any questions 🙂

@wagnert

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

@ktruehl Hi, thanks again for that awesome contribution!! Actually, i'm not sure how the best way to integrate your files into the M2IF core will be, as i need to change the namespace in your files from 'Refusion' to 'TechDivision' as well as we have to replace the license header as it is not possible to combine the OSL 3.0 with a proprietary license. For sure the copyright part can stay REFUSION GmbH. The best way would be when i create a new repository (e. g. techdivision/import-product-tier-price) and you create a PR with the changes. Otherwise i can do that for you. So please tell me, what your preferred way will be.

@ktruehl

This comment has been minimized.

Copy link
Author

commented Apr 16, 2019

Yeah. I just gave you the files so you could do with them what you wanted. :) The idea is that I can remove at least parts of the code I wrote and have it officially supported by M2IF. Probably not very clever of myself to include the license headers. So feel free to change the namespace and remove the license header. It would be great if you could keep the author and maybe some mention of my company.

@wagnert

This comment has been minimized.

Copy link
Member

commented Apr 16, 2019

@ktruehl Perfect, then I will remove the license part and change it to OSL-3.0 and of course I keep the authorship and the copyright notice of REFUSION GmbH. 👍

@wagnert

This comment has been minimized.

Copy link
Member

commented Apr 20, 2019

I've created a first version in the repository techdivision/import-product-tier-price. I didn't found the time for real testing, but it would be nice, if you could check if the integration is acceptable for you (especially as i mentioned you + REFUSION GmbH as author).

Additionally i figured out, that you still have implemented the add-update as well as the delete operation. The replace seems not yet be implemented. Also i figured out, that the fixed price functionality should work, The discount still needs to be implemented, is that right?

Thanks again @ktruehl

@wagnert wagnert moved this from ToDo to In Progress in M2IF May 3, 2019

@wagnert

This comment has been minimized.

Copy link
Member

commented May 4, 2019

Added to version 3.3.0 + 2.4.0.

@wagnert wagnert closed this May 4, 2019

@wagnert wagnert moved this from In Progress to Done in M2IF May 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.