Sfoglia il codice sorgente

[Backend] API adresses : correctif

develop
Guillaume 3 anni fa
parent
commit
a47ce16cbb
1 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. +8
    -1
      ShopBundle/Controller/AddressApiController.php

+ 8
- 1
ShopBundle/Controller/AddressApiController.php Vedi File

@@ -42,8 +42,15 @@ class AddressApiController extends AbstractController

$codesPostaux = $city->codesPostaux ;

if($context == 'frontend') {
$label = '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>' ;
}
else {
$label = $city->nom.' - '.$codesPostaux[0] ;
}

$return[] = [
'label' => '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>',
'label' => $label,
'city' => $city->nom,
'value' => $city->code
] ;

Loading…
Annulla
Salva