Conversation
| $appends = array_filter($attributes, fn ($key) => $product->hasAnyGetMutator($key)); | ||
| $relations = array_filter( | ||
| array_map(fn ($key) => Str::camel($key), $attributes), | ||
| fn ($key) => $product->isRelation($key) | ||
| ); | ||
|
|
||
| $data = Arr::only($product->toArray(), $attributes); | ||
| $data = Arr::only($product->append($appends)->loadMissing($relations)->toArray(), $attributes); |
There was a problem hiding this comment.
This is not immediately used so could be removed.
But it adds the ability to activate getters and relationships when asking for them in the productpage.frontend.attributes filter
There was a problem hiding this comment.
Can you explain this a bit more?
There was a problem hiding this comment.
the values in $attributes are only kept after the toArray function.
If the attribute is not present in the appends, or is a relation which is not eager loaded it will still not show up.
This code checks if the attribute is a relation or attribute to append and does so
…ature/tier-prices
…ature/tier-prices
There was a problem hiding this comment.
These are changed due to the fusion backback tier price for qty of 1
(2nd row to the right)
There was a problem hiding this comment.
This file is changed due to the fusion backpack being in the related products slider
| $appends = array_filter($attributes, fn ($key) => $product->hasAnyGetMutator($key)); | ||
| $relations = array_filter( | ||
| array_map(fn ($key) => Str::camel($key), $attributes), | ||
| fn ($key) => $product->isRelation($key) | ||
| ); | ||
|
|
||
| $data = Arr::only($product->toArray(), $attributes); | ||
| $data = Arr::only($product->append($appends)->loadMissing($relations)->toArray(), $attributes); |
There was a problem hiding this comment.
Can you explain this a bit more?
There was a problem hiding this comment.
Looks good! UI could change if they configure more then 10+ rules for this, then it's better to build it within a dropdown. But for now it's fine
|
The failed pipeline is due to the updated screenshots |
This PR adds support for tier prices to Rapidez.
If a Tierprice with qty of 1 is added it will not be shown on the product page as is default in Magento.
This can be used to set different prices for different customer groups. Search and category pages also respect this.
Magento for reference:

ref: RAP-1626