File tree 1 file changed +9
-13
lines changed
1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -101,19 +101,15 @@ function hookDisplayHome($params)
101
101
$ stateGetAway = $ this ->_stateShopGetAway ();
102
102
for ($ i = 0 ; $ i < count ($ shopsInformations ); $ i ++)
103
103
{
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
+ }
117
113
$ shopsInformations [$ i ]['min_price ' ] = $ minPrice ;
118
114
}
119
115
You can’t perform that action at this time.
0 commit comments