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

Products in wishlist show $0.00 price #6866

Closed
serzhik opened this issue Oct 4, 2016 · 15 comments
Closed

Products in wishlist show $0.00 price #6866

serzhik opened this issue Oct 4, 2016 · 15 comments
Assignees
Labels
bug report Component: Catalog Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@serzhik
Copy link
Contributor

serzhik commented Oct 4, 2016

Preconditions

  1. Install EE 2.0.2
  2. Upgrade to EE 2.1.1
    or
  3. Install CE 2.0.2
  4. Upgrade to CE 2.1.0

Steps to reproduce

  1. Sign in
  2. Add product to wishlist
  3. Go to wishlist

Expected result

  1. Products showed with price

Actual result

  1. Products showed with $0.00 value
    chrome_2016-10-03_20-02-35
@pobrassard
Copy link

pobrassard commented Oct 4, 2016

@serzhik This happens when you add a configurable/virtual product without selecting the options. When you add a configurable product to the cart, you never really buy the configurable product but the products associated to its options.

Try to selecting a color/size before you add them to your wishlist. You can also try adding a simple product to see if the price shows in the wishlist.

@Igloczek
Copy link
Contributor

Igloczek commented Oct 9, 2016

@pobrassard That's true, but we need to tell about this our clients somehow, b/c this product doesn't cost 0.00$ in any configuration.

So there are few scenarios how it should be fixed:

  • disable ability to add configurable product to wishlist, without selecting all options. But it's suck, b/c we can't use simple "heart" button on category view / home page / any other products listing - not so good idea
  • hide price for configurable products without selected options - quickest fix
  • display price range of all possible configurations instead of 0.00$ - best option

PS. Preconditions are much simpler - it's possible to reproduce on any stable M2 version.
Steps to reproduce - Add configurable product to wishlist from category page.

@antboiko
Copy link

Hi @serzhik ,

Thanks for reporting this issue. We've created internal ticket MAGETWO-59512.

Regards,
Anton.

@antboiko antboiko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Catalog 2.1.x labels Oct 10, 2016
@serzhik
Copy link
Contributor Author

serzhik commented Oct 25, 2016

UPD: It's don't work on clean Magento EE 2,1.1 install with sample data.

@serzhik
Copy link
Contributor Author

serzhik commented Oct 26, 2016

Look at vendor\magento\module-wishlist\Pricing\ConfiguredPrice\ConfigurableProduct.php

    public function getValue()
    {
        $result = 0.;
        /** @var \Magento\Wishlist\Model\Item\Option $customOption */
        $customOption = $this->getProduct()->getCustomOption('simple_product');
        if ($customOption) {
            /** @var \Magento\Framework\Pricing\PriceInfoInterface $priceInfo */
            $priceInfo = $customOption->getProduct()->getPriceInfo();
            $result = $priceInfo->getPrice(self::PRICE_CODE)->getValue();
        }
        return max(0, $result);
    }

https://github.com/magento/magento2/blob/2.1/app/code/Magento/Wishlist/Pricing/ConfiguredPrice/ConfigurableProduct.php#L22-L33

mmansoor-magento pushed a commit that referenced this issue Oct 26, 2016
mmansoor-magento pushed a commit that referenced this issue Oct 26, 2016
mmansoor-magento pushed a commit that referenced this issue Oct 26, 2016
[Folks] Bugs:
- MAGETWO-59258 [Github] Override module-directory/etc/zip_codes.xml only the last code of a country gets included #6694
- MAGETWO-59512 [GitHub] Products in wishlist show $0.00 price #6866
- MAGETWO-59185 [GITHUB] Offline carrier configuration option "showmethod" does not appear in admin panel carrier configuration page #5693
- MAGETWO-59130 [Github] REST API with searchCriteria does not return category_ids #6127
- MAGETWO-57850 Unable to filter blocks using store view and block ID
- MAGETWO-57682 [GitHub] Checkout Agreement validation is broken on payment method change #6224
- MAGETWO-59573 Braintree JS error on checkout after applying 100% discount coupon with free shipping enabled
@SerhiyShkolyarenko
Copy link
Contributor

The fix is delivered to develop branch. Closing the issue.

@Igloczek
Copy link
Contributor

It's going to be released as standalone update to Magento_Wishlist module or we have to wait for 2.2 to get this fix?

@Ctucker9233
Copy link

@Igloczek use the above commits and do a diff comparison on your code.

@Igloczek
Copy link
Contributor

Igloczek commented Nov 2, 2016

I know that I can handle everything on my own, but it's painful when you have ~10-20 modules to just fix something, flying around ~5 projects, with ~20 devs working on them...

I'm pretty sure that there was a plan to release patches to modules independently from main project releases and AFAIK you are talking about doing that after 2.1.2 (same as about smaller, but frequent updates of whole product)

CC @benmarks @piotrekkaminski @pboisvert

@Ctucker9233
Copy link

@Igloczek I have no doubt they will release it in some up coming patch or upgrade. I don't work for Magento so I don't really know. I assumed you needed a quick fix and that's the only method I know. Sorry for misunderstanding.

@zzvara
Copy link

zzvara commented Apr 30, 2017

I'm using Magento 2.1.6. This is still a problem. Any fix any time soon?

@korostii
Copy link
Contributor

korostii commented May 3, 2017

@zzvara, not likely

As I understand it, no backport is planned "by default" and closed tasks are not tracked by the core team neither (see here for an detailed official Magento Inc.'s response about that).

In general, here's what you could do if you're interested to get it backported:
a) create a pull request pointing at 2.1-develop as described here
b) create a new GitHub Issue referencing the original one and asking to backport the fix into 2.1.

Additionally, mentioning a certain relevant Magento, Inc. employee somewhere in the discussion (just Igloczek did) might help bringing attention to it.

hostep pushed a commit to hostep/magento2 that referenced this issue May 9, 2017
…$0.00 price magento#6866

MAGETWO-59512: [GitHub] Products in wishlist show $0.00 price magento#6866

(cherry picked from commit c7d18bd)

MAGETWO-59512: [GitHub] Products in wishlist show $0.00 price magento#6866

(cherry picked from commit 42dbe3f)

MAGETWO-59512: [GitHub] Products in wishlist show $0.00 price magento#6866
-- functional test

(cherry picked from commit 199456a)

MAGETWO-59512: [GitHub] Products in wishlist show $0.00 price magento#6866
-- functional test

(cherry picked from commit c0ec134)
magento-team pushed a commit that referenced this issue May 15, 2017
… wishlist show sh.00 price #6866 #9571

 - Merge Pull Request #9571 from hostep/magento2:backport-magetwo-59512
magento-team pushed a commit that referenced this issue May 15, 2017
magento-team pushed a commit that referenced this issue May 15, 2017
@dharmendrakothe
Copy link

Main issue fix but still showing 0.00 on sidebar

@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-69023

@DaimPiek
Copy link

DaimPiek commented Oct 5, 2017

This problem still occurs in Magento 2.1.7. Both in sidebar as on the 'My account' page.

I managed to pinpoint the problem in the following function:
\Magento\Wishlist\Pricing\ConfiguredPrice\ConfigurableProduct::getValue

Which checks if a configurable product has an option selected. If that is not the case it just returns 0.0.

I wrote a plugin for this function returning the Minimum price instead.

   /**
     * @param BaseConfigurableProduct $subject
     * @param callable                $proceed
     *
     * @return float
     */
    public function aroundGetValue(BaseConfigurableProduct $subject, callable $proceed)
    {
        /** @var \Magento\Wishlist\Model\Item\Option $customOption */
        $customOption = $subject->getProduct()->getCustomOption('simple_product');
        if ($customOption) {
            /** @var \Magento\Framework\Pricing\PriceInfoInterface $priceInfo */
            $priceInfo = $customOption->getProduct()->getPriceInfo();
            return $priceInfo->getPrice($subject::PRICE_CODE)->getValue();
        }

        return (float)$subject->getProduct()->getMinPrice();
    }

This solves both issues ('My account' page and the sidebar).

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 5, 2017
mmansoor-magento pushed a commit that referenced this issue Aug 10, 2021
[cia] MC-42311: 2.4.3-develop stabilization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Catalog Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests