瀏覽代碼

OrderShopRepository : recherche hors tournée et bon cadeaux

develop
Guillaume 3 年之前
父節點
當前提交
8dd41d578b
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. +3
    -2
      ShopBundle/Repository/OrderShopRepository.php
  2. +2
    -2
      ShopBundle/Services/Utils.php

+ 3
- 2
ShopBundle/Repository/OrderShopRepository.php 查看文件

@@ -4,6 +4,7 @@ namespace Lc\ShopBundle\Repository;

use App\Entity\DeliveryAvailabilityPointSale;
use App\Entity\DeliveryAvailabilityZone;
use App\Entity\PointSale;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\QueryBuilder;
use Lc\ShopBundle\Context\DefaultRepositoryInterface;
@@ -232,11 +233,11 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
}

if($setParameterHorsTournee) {
$query->setParameter('devAliasHorsTournee', 'horstournee') ;
$query->setParameter('devAliasHorsTournee', PointSale::DEV_ALIAS_OFF_CIRCUIT) ;
}

if($setParameterGiftVoucher) {
$query->setParameter('devAliasGiftVoucher', 'giftvoucher') ;
$query->setParameter('devAliasGiftVoucher', PointSale::DEV_ALIAS_GIFT_VOUCHER) ;
}

if (isset($params['deliveryAvailability'])) {

+ 2
- 2
ShopBundle/Services/Utils.php 查看文件

@@ -87,10 +87,10 @@ class Utils
return $text;
}

public function limitTextByLength($text, $length)
public function limitTextByLength($text, $length, $append = '...')
{
if(strlen($text) > $length) {
$text = substr($text, 0, $length).' ... ' ;
$text = substr($text, 0, $length) . $append ;
}

return $text ;

Loading…
取消
儲存