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

Price is always null #163

Closed
richstandbrook opened this issue May 27, 2021 · 2 comments
Closed

Price is always null #163

richstandbrook opened this issue May 27, 2021 · 2 comments

Comments

@richstandbrook
Copy link

  • Bazar Version: dev-master
  • Laravel Version: 8.44.0
  • PHP Version: 7.4.19
  • Database Driver & Version: PostgreSQL 12

Description:

Bazar\Models\Product::first()->price results in null even though a price is set.

Steps To Reproduce:

Create a product, enter a price, you can see from domain.test/bazar/products that no price is shown.

Bazar\Models\Product::first()->price and Bazar\Models\Product::first()->formatedPrice return null.

Bazar\Models\Product::first()->prices returns a Bazar\Casts\Prices object that shows the entered value under storage->GBP->default

@iamgergo
Copy link
Member

Thanks!

Normally I've fixed it in dev-master, maybe you need to resave your price values.

The currencies should be lowercase storage->GBP->default --> storage->gbp->default.

@iamgergo
Copy link
Member

I release v0.9.0, that should solve this now as a tagged version.

It contains a lots of BC-s, so you might update your code.
I'll update the documentation soon.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants