Skip to content

magento/magento2 #9196 - Products ordered report doesn't show simple (child) products of configurable products #9908

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

Merged
merged 10 commits into from
Jul 18, 2017

Conversation

vkranjith
Copy link
Contributor

@vkranjith vkranjith commented Jun 12, 2017

Products ordered report doesn't show simple (child) products of configurable products

Description

Separated simple products of a configurable in product ordered report so that it shows the simple (child) product of a configurable product.

This was achieved by changing the following files.

  1. Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml
  2. Magento/Reports/Model/ResourceModel/Product/Sold/Collection.php

Fixed Issues (if relevant)

  1. Products ordered report doesn't show simple (child) products of configurable products #9196: Products ordered report doesn't show simple (child) products of configurable products

Manual testing scenarios

  1. Order two or more items of a configurable product with different configurations.
  2. Log in to the Store Admin panel and go to Reports > Products > Ordered.
  3. Give the appropriate filters and click on "Refresh" button to get the report.
  4. Simple products would be listed with its configurable product name and the simple product SKU.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jun 12, 2017

CLA assistant check
All committers have signed the CLA.

@vkranjith
Copy link
Contributor Author

@magento-cicd2

I am not able to get past the first screen that asks for "Sign in with GitHub". Everytime it gives me a blank agreement. Please see the attachment.
cla

@okorshenko okorshenko self-assigned this Jun 15, 2017
@okorshenko okorshenko added this to the June 2017 milestone Jun 15, 2017
@vherasymenko
Copy link

vherasymenko commented Jun 27, 2017

I check your PR and have next comment:

Steps which I execute:

  1. Create configurable product with few options.
  2. Create bundle(dynamic) product with few options.
  3. Create bundle(fixed) product with few options.
  4. Add all created product to cart with configured options, and place order.
  5. Go to Admin side 'Reports > Product > Ordered' and generate report about product which were bought in previous step.
Actual Result: Expected Result:
Configurable product displayed with child products. It`s correct behavior
Bundle(dynamic) displayed with child products. It`s correct behavior
Bundle(fixed) displayed without child products. Should be displayed with child products

Could you please improve code for bundle(fixed) too ?

Thanks for your contribution.

Note: see attach screenshots:

configurable
bundle dynamic
bundle fixed

@vkranjith
Copy link
Contributor Author

@k7triton - Sure I will work on that.

keeping the forked develop branch updated with Magento 2 develop branch
@okorshenko okorshenko modified the milestones: June 2017, July 2017 Jul 2, 2017
@vkranjith
Copy link
Contributor Author

Hi @k7triton and @okorshenko

I have used a new Grid\Column block file extending the Widget\Grid\Column to control rendering the correct SKU based on the data. I have also made few changes to the SQL to get the necessary SKU data for bundle products.

Below is the screenshot of a report for few different types of items ordered.
screen shot 2017-07-10 at 2 53 26 pm

Bundle Prod 1 is a fixed type bundle product. Here I am seeing an issue with the quantity. The item quantity for the Bundle Prod 1 (Fixed Type) and Bundle Prod 2 (Dynamic type) are "1" but the associated simple product's "Default Quantity" in backend was "100". So the actual quantity ordered should be "100" (coming from the associated simple product) not "1" (coming from the parent bundle product).

Should this quantity issue also be fixed just like the SKU or is there any other business scenario to be taken care?

@okorshenko
Copy link
Contributor

hi @vkranjith
thank you for the fix. We requested PO feedback about proposed changes.
Thank you

@tkacheva
Copy link

tkacheva commented Jul 12, 2017

@vkranjith Is the solution to show SKU of bundle options in brackets? Like
BundleFixedName ..... BundleFixedSKU( BundleFixedOption1, BundleFixedOption2, ....)

Since Magento have 2 types of bundle product and one of it is supposed to ignore its option SKU (fixed SKU) it's better to ignore BundleFixedOptionSKU and show only BundleFixedSKU and its quantity:

BundleFixedName ..... BundleFixedSKU.......1

BundleFixed with its options SKU doesn't fit into the flat data structure.

@vkranjith
Copy link
Contributor Author

@okorshenko and @tkacheva

For BundleFixed product the option SKUs are within the brackets.

I am getting this info through a small customization to the existing MySQL query and a column block (specifically for fixed bundle) to render the value.

Let me know going forward what I should be doing.

@okorshenko
Copy link
Contributor

HI @vkranjith

  1. Bundle fixed SKU - display the SKU of the Bundle product. Don't display option's SKUs
  2. Bundle Dynamic - - display the SKU of the option. For example: BundleDynamicSKU-BundleOption1SKU-BundleOption2SKU
  3. Display the amount of ordered bundle products (not the qty of the items)

Please, let me know if you have any questions

@magento-team magento-team merged commit 78b5f28 into magento:develop Jul 18, 2017
magento-team pushed a commit that referenced this pull request Jul 18, 2017
…'t show simple (child) products of configurable products #9908
magento-team pushed a commit that referenced this pull request Jul 18, 2017
[EngCom] Public Pull Requests

 - MAGETWO-70817: remove redundant else and use strict check #10271
 - MAGETWO-70787: update phpserver to support versioned static urls #10250
 - MAGETWO-70764: Fix overwrite default value image/file with NULL #10253
 - MAGETWO-70761: Show values that are duplicate in attribute error msg #10213
 - MAGETWO-70758: Fix for #4530 $product->getRatingSummary() always returns null […] #10248
 - MAGETWO-70706: simplify product lists #2 #9019
 - MAGETWO-70669: Fix fatal errors with deleteOptionsAndSelections #7711
 - MAGETWO-70464: Fix shipping address can use for billing #10130
 - MAGETWO-69913: magento/magento2 #9196 - Products ordered report doesn't show simple (child) products of configurable products #9908
magento-team pushed a commit that referenced this pull request Oct 3, 2017
… report doesn't show simple (child) products of configurable products #9908 - for 2.2
magento-team pushed a commit that referenced this pull request Oct 3, 2017
… report doesn't show simple (child) products of configurable products #9908 - for 2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants