ver. 0.271 - ShopAttribute refactor + update package

This commit is contained in:
2026-02-14 21:12:17 +01:00
parent 34e23338da
commit e51ac7f82b
27 changed files with 2367 additions and 726 deletions

View File

@@ -162,6 +162,7 @@ class ShopProduct
global $mdb;
$vat = $mdb -> get( 'pp_shop_products', 'vat', [ 'id' => $product_id ] );
$attributeRepository = new \Domain\Attribute\AttributeRepository( $mdb );
$permutations = \shop\Product::array_cartesian( $attributes );
if ( \S::is_array_fix( $permutations ) ) foreach ( $permutations as $permutation )
@@ -179,7 +180,7 @@ class ShopProduct
$permutation_hash .= $key . '-' . $val;
// sprawdzenie czy atrybut ma wpływ na cenę
$value_details = \admin\factory\ShopAttribute::value_details( $val );
$value_details = $attributeRepository -> valueDetails( (int)$val );
$impact_on_the_price = $value_details[ 'impact_on_the_price' ];
if ( $impact_on_the_price > 0 )