craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
218 stars 170 forks source link

[4.x]: Discount delivery address always sets billing address condition #2938

Closed vandres closed 2 years ago

vandres commented 2 years ago

What happened?

Description

I would like to create a discount condition depending on the shipping address of the user. The rule is set, but it always also sets it as the billing address condition

Before saving: Bildschirmfoto 2022-08-17 um 13 54 51

After saving: Bildschirmfoto 2022-08-17 um 13 55 05

Steps to reproduce

  1. Create discount
  2. Set shipping address condition
  3. Save
  4. Billing address condition is now also set

Expected behavior

Billing address condition can be set individually

Actual behavior

Billing address condition cannot be set individually

Craft CMS version

4.2.1.1

Craft Commerce version

4.1.0

PHP version

8.1

Operating system and version

MacOS, Debian Docker

Database type and version

MariaDB 10.5

Image driver and version

-

Installed plugins and versions

  "require": {
    "craftcms/cms": "^4.2.0.2",
    "craftcms/commerce": "^4.1",
    "craftcms/redactor": "^3.0",
    "firephp/firephp-core": "^0.5.3",
    "mmikkel/cp-field-inspect": "^1.4",
    "nystudio107/craft-vite": "^4.0",
    "php-http/curl-client": "^2.2",
    "spicyweb/craft-neo": "^3.2",
    "typesense/typesense-php": "^4.8",
    "vaersaagod/geomate": "^2.0",
    "verbb/expanded-singles": "^2.0",
    "verbb/field-manager": "^3.0",
    "verbb/tablemaker": "^4.0",
    "verbb/wishlist": "^2.0",
    "vlucas/phpdotenv": "^5.4.0"
  },
  "require-dev": {
    "roave/security-advisories": "dev-master",
    "deployer/deployer": "^7.0",
    "yiisoft/yii2-shell": "^2.0.3"
  },
lukeholder commented 2 years ago

Thanks for reporting, this has been fixed for the next release.

To get the fix early, change your craftcms/commerce requirement in composer.json to:

"require": {
  "craftcms/commerce": "dev-develop#09f205bfa7d0c9c7dae3c5c1ed3e315a75d41e5e as 4.1.0",
  "...": "..."
}

Then run composer update.