Skip to content

Commit bf44160

Browse files
Second modification
1 parent d860f99 commit bf44160

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

multishopselector.php

+9-13
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,15 @@ function hookDisplayHome($params)
101101
$stateGetAway = $this->_stateShopGetAway();
102102
for($i = 0; $i < count($shopsInformations); $i++)
103103
{
104-
// Récupération du transporteur lié au nom du magasin
105-
$resultQuery1 = (Db::getInstance()->executeS('select id_carrier from ps_carrier where name =' . $shopsInformations[$i]['name'] . ' AND deleted = 0'));
106-
// Récupération du tarif minimal de livraison du transporteur trouvé ci-dessus
107-
if(count($resultQuery1))
108-
{
109-
$resultQuery2 = (Db::getInstance()->executeS('select delimiter1 from ps_range_price where id_carrier =' . $resultQuery1[0]['id_carrier']));
110-
$minPrice = intval($resultQuery2[0]['delimiter1']) . '';
111-
}
112-
else
113-
{
114-
$minPrice = 'Pas de somme fixée';
115-
}
116-
104+
// Take carrier identity for the shop
105+
$resultQuery1 = (Db::getInstance()->executeS('select id_carrier from ps_carrier where name =' . $shopsInformations[$i]['name'] . ' AND deleted = 0'));
106+
// Get minimal price for the carrier
107+
$minPrice = 'No minimal price';
108+
if(count($resultQuery1))
109+
{
110+
$resultQuery2 = (Db::getInstance()->executeS('select delimiter1 from ps_range_price where id_carrier =' . $resultQuery1[0]['id_carrier']));
111+
$minPrice = intval($resultQuery2[0]['delimiter1']) . '';
112+
}
117113
$shopsInformations[$i]['min_price'] = $minPrice;
118114
}
119115

0 commit comments

Comments
 (0)