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

[4.x]: Sales not applying to products #2976

Closed
robzor opened this issue Sep 20, 2022 · 4 comments
Closed

[4.x]: Sales not applying to products #2976

robzor opened this issue Sep 20, 2022 · 4 comments
Labels
bug commerce4 Issues related to Commerce v4

Comments

@robzor
Copy link

robzor commented Sep 20, 2022

What happened?

Description

If i click 'Add to Sale' in a variant or 'Add all to sales' in the right hand sidebar and select any variants, they are not being applied to the sale. In the console I can see this:

CleanShot 2022-09-20 at 4 00 04

The response is []

Shortly afterwards (no user action just with the product page open) there is an XHR request:

CleanShot 2022-09-20 at 4 00 45

With a response of {"sales":[]}

I am running the site locally via Laravel Valet on OSX.

Is there a good way I can expose the log for this, as I am getting a 'Added to sale' confirmation toast message but obviously it's not working?

Steps to reproduce

  1. Create a sale
  2. Add a variant to the sale

Expected behavior

Variant is added to sale

Actual behavior

Variant is not added to sale

Craft CMS version

4.2.4

Craft Commerce version

4.1.2

PHP version

8.0.17

Operating system and version

Mac OSX Catalina 10.15.7

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@robzor robzor added commerce4 Issues related to Commerce v4 bug labels Sep 20, 2022
@nfourtythree
Copy link
Contributor

Hi @robzor

Thank you for bringing this to our attention. We have just pushed up a fix for the issue which will be included in the next release of Commerce.

To get this early, change your craftcms/commerce requirement in your project's composer.json to:

"require": {
  "craftcms/commerce": "dev-develop#700229aeac88abd6edc2ac3111a6b3f12ac7b917 as 4.1.2",
  "...": "..."
}

Then run composer update.

Thanks

@robzor
Copy link
Author

robzor commented Sep 21, 2022

Thanks, I'll give this a go :)

@stefanfriedrich
Copy link

@nfourtythree bug seems to be back, I have the same problem with craft 4.3.10 and commerce 4.2.5.1.
In sales I can add the variant, but variant onSale is false.

@lukeholder
Copy link
Member

See my question on #3097 please @stefanfriedrich thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4
Projects
None yet
Development

No branches or pull requests

4 participants