ver. 0.271 - ShopAttribute refactor + update package
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user