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

[DFC Orders] List products to import on screen #12301

Open
7 of 11 tasks
mkllnk opened this issue Mar 22, 2024 · 8 comments
Open
7 of 11 tasks

[DFC Orders] List products to import on screen #12301

mkllnk opened this issue Mar 22, 2024 · 8 comments
Assignees

Comments

@mkllnk
Copy link
Member

mkllnk commented Mar 22, 2024

ℹ️ Funded Feature. Please track ALL ASSOCIATED WORK under the associated tracking code #11678 DFC Orders

A basic product import has been done:

But there are some outstanding tasks from #12139:

  • The input field "Enterprise" should be labelled "Create products for enterprise:".
  • List of products to import is displayed on the screen.
  • Each product has an import button to import that product into OFN. Technically, the form can contain the whole JSON and post it do the OFN DFC API to do the work. But another controller action or reflex can do this as well.
  • Already imported products have a disabled import button.

Import improvements

@drummer83 found several issues during the import. When importing as variant of existing products:

  • Imported variants of unit type 'item' have variant name = original name + (unit + unit scale). That's okay.
  • Imported variants of other unit type have variant name = original name
  • Imported variants have no SKU (probably ok). The SKU needs to be unique. It was probably in conflict in this case.
  • Imported variants of unit type 'item' have unit '1piece' now.
  • Imported variants have price 0.
  • Imported variants have stock 0. This is probably good. We don't want to duplicate the stock across platforms.
  • Imported variants have tax category 'default' - no matter the original tax category. Tax categories are not modelled in OFN.

Importing as new products (from a different enterprise):

  • Imported variants of other unit type with original variant name = '' have variant name = product name '-' unit That's okay.
  • Imported variants have price 0.
  • Imported variants have stock 0. This is probably good. We don't want to duplicate the stock across platforms.
  • Imported variants have tax category 'default' - no matter the original tax category. Tax categories are not modelled in OFN.
@RaggedStaff
Copy link
Collaborator

Couple of enhancements/thoughts:

  1. Already imported products have an "Update" button.
  2. We need an option to import all
  3. I think a modal that allows checking of certain products might be more user-frienldy (as in check to include Product in chosen enterprise)...
  4. ... but that implies the option to remove the Product by unchecking the box.

I think this is additional scope, but I'd like to get an estimate, with these extra options (assuming the current 3 days doesn't stand), @mkllnk ?

@dacook dacook self-assigned this Jan 21, 2025
@dacook dacook moved this from All the things 💤 to In Progress ⚙ in OFN Delivery board Feb 4, 2025
@dacook
Copy link
Member

dacook commented Feb 10, 2025

Hi @RaggedStaff (ccc @mkllnk ), the main requirement of this issue is ready for testing, however I note a few other things mentioned which may or may not be important. Attempting to summarise:

  • The input field "Enterprise" should be labelled "Create products for enterprise:"
  • Products can be reviewed before import
  • Choose which new products to create
  • Choose which existing products to update
  • a modal that allows checking of certain products*
  • I'm not sure exactly what you meant by this. At first I imagined the product preview modal (available on Admin > Products > (product row) > > Preview. But I guess you'd want to preview the product as it would be imported, which might be a bit of effort.
    Another thought I had would be to show a summary of changes in the table. For example using green and red like a diff, or strikethrough:
- Tomato sauce
+ Red sauce

But it wouldn't be practical to show a column for every single change. Hmm but maybe we could show that in a modal, for each product.

Also there are improvements mentioned by Konrad. Do these need fixing? If so, I'd need some more details about what the behaviour should be..

  • Imported variants of other unit type have variant name = original name
  • Imported variants of unit type 'item' have unit '1piece' now.
  • Imported variants have price 0. (when new or existing)

Can you please confirm the next steps after the current PR?

@dacook
Copy link
Member

dacook commented Feb 10, 2025

PS Just remembered also something that I discussed with Maikel:

  • Add shortcut to select/deselect all
    (or add more options like select only new, select only update)

And of course there's a world of improvements we could add to the table: styling, add more columns, maybe a column selector..

@mkllnk
Copy link
Member Author

mkllnk commented Feb 10, 2025

Imported variants have price 0.

Is that still the case? I thought that's solved. The price can even be calculated from the wholesale product.

@mkllnk
Copy link
Member Author

mkllnk commented Feb 10, 2025

Imported variants of unit type 'item' have unit '1piece' now.

Maybe the label isn't right? OFN talks about items when DFC talks about pieces. I'm not sure if it matters but the label 1piece doesn't seem right.

@mkllnk
Copy link
Member Author

mkllnk commented Feb 10, 2025

Imported variants of other unit type have variant name = original name

I'm not sure where the problem is here.

@dacook
Copy link
Member

dacook commented Feb 12, 2025

One more thing I noticed while working on this (although not directly related):

  • When importing over an existing product, the variant name is updated, but product name is not.

@mkllnk
Copy link
Member Author

mkllnk commented Feb 12, 2025

When importing over an existing product, the variant name is updated, but product name is not.

Yes, because you might be importing multiple variants and you don't want to override the product name which may have been set in the OFN UI.

And I'm currently working on the DFC variants. The import can then have a DFC product that represents the Spree product and we can copy the name from there. So nothing worry about here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Status: In Progress ⚙
Development

No branches or pull requests

4 participants