Browse Source

[Backend] API adresses : correctif

develop
Guillaume 3 years ago
parent
commit
a47ce16cbb
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      ShopBundle/Controller/AddressApiController.php

+ 8
- 1
ShopBundle/Controller/AddressApiController.php View 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…
Cancel
Save