lowest & highest methods for PricingManager #190
poppabear8883
started this conversation in
Feature Requests
Replies: 1 comment
-
Yeah, it would be great, for now you can add to the formatter or the model by yourself, I did something like this $prices = $this->variants->pluck('basePrices')->flatten();
$maxPrice = $prices->max('price');
$minPrice = $prices->min('price'); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Often devs will need to know the lowest or highest price from within the collection of variants.
I think we should have methods like
Pricing::lowest($variants)
&Pricing::highest($variants)
Example use case would be a product card showing something like
Starting at $x.xx
orFrom $x.xx - $xx.xx
Beta Was this translation helpful? Give feedback.
All reactions