Skip to content

fix problem with setCartFixedRules #1768

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

Closed
wants to merge 1 commit into from

Conversation

barbarich-p
Copy link
Contributor

Problem:
You redeclare setData to set imploded streets, but this method is used by Your discount model, for example
$address->setCartFixedRules($cartRules);
in result array of cart rules set like string and discount to whole cart don't work properly.

How To Reproduce:
You can reproduce this issue by giving discount to whole cart with more than 1 item in cart.
Discount applied 1 time and after that you set array of cartRules to address, but in result you set string instead array and cartFixed rule was broken.
screen shot - http://joxi.ru/vAWRbgGFMwzv2W?d=1 , http://joxi.ru/4Ak05d1hw3DVrq?d=1

Why this fix:
Just redeclare setter of CartFixedRules and call parent setData to prevent imploding strings

Problem:
You redeclare setData to set imploded streets, but this method is used by Your discount model, for example
$address->setCartFixedRules($cartRules);
in result array of cart rules set like string and discount to whole cart don't work properly.

How To Reproduce:
You can reproduce this issue by giving discount to whole cart with more than 1 item in cart.
Discount applied 1 time and after that you set array of cartRules to address, but in result you set string instead array and cartFixed rule was broken.
screen shot - http://joxi.ru/vAWRbgGFMwzv2W?d=1 , http://joxi.ru/4Ak05d1hw3DVrq?d=1

Why this fix:
Just redeclare setter of CartFixedRules and call parent setData to prevent imploding strings
@vpelipenko vpelipenko added the CS label Sep 1, 2015
@slavvka
Copy link
Member

slavvka commented Sep 24, 2015

This issue has aready been fixed in MAGETWO-42590 ticket on #1776 issue and will be delivered soon. But thank you for your efforts!

@magento-cicd2
Copy link
Contributor

We have automated a Magento Contributor License Agreement verifier for contributions sent to our GitHub projects.
Please see the CLA agreement in the Pull Request comments below.

@davidalger
Copy link
Member

This issue was fixed internally. Closing

@davidalger davidalger closed this Nov 10, 2015
okorshenko pushed a commit that referenced this pull request Nov 27, 2017
Public Pull Requests

#12397 Attribute with "Catalog Input Type for Store Owner" equal "Fixed Product Tax" for Multi-store by @klakovskiy
#12376 10058: Tablerate->getCsvFile() fails with non-default PHP upload_tmp_dir(2.3) by @RomaKis
#12044 [Backport 2.3] Add swatch option: Prevent loosing data and default value if data is not populated via adminhtml by @gomencal

Fixed Public Issues

#12393 Attribute with "Catalog Input Type for Store Owner" equal "Fixed Product Tax" for Multi-store
#10058 Tablerate->getCsvFile() fails with non-default PHP upload_tmp_dir
#9410 Impossible to add swatch options via Service Contracts if there is no existing swatch option for attribute
#10707 Create attribute option via API for swatch attribute fails
#10737 Can't import attribute option over API if option is 'visual swatch'
#11032 Unable to add new options to swatch attribute
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.

6 participants