Browse Source

OrderShopRepository : recherche hors tournée et bon cadeaux

develop
Guillaume 3 years ago
parent
commit
8dd41d578b
2 changed files with 5 additions and 4 deletions
  1. +3
    -2
      ShopBundle/Repository/OrderShopRepository.php
  2. +2
    -2
      ShopBundle/Services/Utils.php

+ 3
- 2
ShopBundle/Repository/OrderShopRepository.php View File



use App\Entity\DeliveryAvailabilityPointSale; use App\Entity\DeliveryAvailabilityPointSale;
use App\Entity\DeliveryAvailabilityZone; use App\Entity\DeliveryAvailabilityZone;
use App\Entity\PointSale;
use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use Lc\ShopBundle\Context\DefaultRepositoryInterface; use Lc\ShopBundle\Context\DefaultRepositoryInterface;
} }


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


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


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

+ 2
- 2
ShopBundle/Services/Utils.php View File

return $text; return $text;
} }


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


return $text ; return $text ;

Loading…
Cancel
Save