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

Conditions with multi-values (is one of/is not one of) dosen`t work #8740

Closed
deiserh opened this issue Mar 1, 2017 · 6 comments
Closed

Conditions with multi-values (is one of/is not one of) dosen`t work #8740

deiserh opened this issue Mar 1, 2017 · 6 comments
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@deiserh
Copy link
Contributor

deiserh commented Mar 1, 2017

Preconditions

  1. Magento Version 2.1.4

Steps to reproduce

  1. Create a Catalog Price Rule
  2. Under Conditions add a condition with "is one of" or "is not one of" and a few values
  3. Save the Price Rule

Expected result

  1. On reopen the price rule I expect that all selected values of the condition are saved

Actual result

  1. On reopen only the first value of the condition is saved
@jmtakahashi
Copy link

I can confirm this is an issue and is lacking attention. I used SKU attribute and "is one of".

@deiserh please check this fix -> #8246 which helps saving the multiple selections.

HOWEVER, not all of my selections are saving yet. In issue #8215 which seems like this is the same issue, @miakusha states that you cannot use SKU as a Catalog Rule condition, however, it appears that you can. But when using SKU as a Catalog Rule Condition it does not apply to ALL the items for some reason (some are applied, and some are not). Seems buggy.

To clarify my issue after adding the above mentioned #8246 "fix":

Steps to Reproduce
ALL same:

  1. "If ANY of these conditions are TRUE:"
  2. SKU is one of (multiple sku's selected using the selector box).

Expected result
On close, save, and apply the price rule, I expect that all selected values of the condition are saved and applied to the storefront.

Actual result
On reopen all values are listed (but not physically shown as checked in the selector box), but one or two SKU's do not have the discount applied and also do not show up in the database under the rule.

@koenner01
Copy link
Contributor

koenner01 commented Jun 23, 2017

I can confirm that the fix #8246 works for the multiselect problem (tested in 2.1.7)

I have NOT tried the SKU scenario yet though

@koenner01
Copy link
Contributor

duplicate of #7723

@magento-engcom-team magento-engcom-team added G1 Passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch labels Sep 28, 2017
@magento-engcom-team
Copy link
Contributor

@deiserh, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.

@LeonidTomashevskyAmasty
Copy link

Hello @magento-engcom-team
I think issue is still persist. See this code from the core.

public function getValueParsed()
{
if (!$this->hasValueParsed()) {
$value = $this->getData('value');
if (is_array($value) && isset($value[0]) && is_string($value[0])) {
$value = $value[0];
}

If attribute is multiselect then value is array, and this piece of code will return to process only first element

@hoangnm89
Copy link

hoangnm89 commented Feb 25, 2019

hi @LeonidTomashevskyAmasty, you're right.
Issue is fixed on 2.2.7. ref: 09cf555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

6 participants