@@ -87,11 +87,25 @@ public function get_list($data)
8787 // Get product description
8888 $ product_description_info = $ this ->model_seller_product ->getProductDescription ($ product ['product_id ' ]);
8989
90+ // Get product variant min and max prices
91+ $ product_variant_price = $ this ->model_seller_product ->getProductVariantMinMaxPrices ($ product ['product_id ' ]);
92+
93+ if ($ product_variant_price ) {
94+ $ min_price = $ this ->currency ->format ($ product_variant_price ['min_price ' ], $ this ->currency ->getCurrentCode ());
95+ $ max_price = $ this ->currency ->format ($ product_variant_price ['max_price ' ], $ this ->currency ->getCurrentCode ());
96+ } else {
97+ $ min_price = $ this ->currency ->format (0 , $ this ->currency ->getCurrentCode ());
98+ $ max_price = $ this ->currency ->format (0 , $ this ->currency ->getCurrentCode ());
99+ }
100+
90101 $ data ['products ' ][] = [
91102 'product_id ' => $ product ['product_id ' ],
92103 'name ' => $ product_description_info ['name ' ],
93104 'thumb ' => $ thumb ,
105+ 'product_option ' => $ product ['product_option ' ],
94106 'price ' => $ this ->currency ->format ($ product ['price ' ], $ this ->currency ->getCurrentCode ()),
107+ 'min_price ' => $ min_price ,
108+ 'max_price ' => $ max_price ,
95109 'quantity ' => $ product ['quantity ' ],
96110 'status ' => $ product ['status ' ] ? lang ('Text.enabled ' , [], $ this ->language ->getCurrentCode ()) : lang ('Text.disabled ' , [], $ this ->language ->getCurrentCode ()),
97111 'href ' => $ this ->url ->customerLink ('marketplace/seller/product/edit/ ' . $ product ['product_id ' ], '' , true ),
0 commit comments