瀏覽代碼

[Backend] API adresses : correctif

develop
Guillaume 4 年之前
父節點
當前提交
a47ce16cbb
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. +8
    -1
      ShopBundle/Controller/AddressApiController.php

+ 8
- 1
ShopBundle/Controller/AddressApiController.php 查看文件

@@ -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…
取消
儲存