conedevelopment / bazar

Bazar is an e-commerce package for Laravel applications.
https://root.conedevelopment.com
MIT License
427 stars 57 forks source link

Price is always null #163

Closed richstandbrook closed 3 years ago

richstandbrook commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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!