context->getProducerCurrent(); $this->setTitle('Accueil'); $this->setPageTitle(Html::encode($producer->type . ' à ' . $producer->city)); ?>
description)): ?>
description; ?>

getPointSaleWording($producer); ?>

$dataProviderPointsSale, 'summary' => '', 'columns' => [ [ 'attribute' => 'name', 'format' => 'raw', 'contentOptions' => ['class' => 'name'], 'value' => function ($model) use ($pointSaleModule) { $html = '' . Html::encode($model->name) . ''; if (strlen($model->locality)) { $html .= '
à ' . $pointSaleModule->getSolver()->getLocalityWithAddressTooltip($model); } return $html; } ], [ 'label' => 'Jours de livraison', 'format' => 'raw', 'contentOptions' => ['class' => 'days'], 'value' => function ($model) use ($distributionModule) { $producer = \Yii::$app->controller->getProducerCurrent(); if ($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK) { $arrayDays = [ 'monday' => 'Lundi', 'tuesday' => 'Mardi', 'wednesday' => 'Mercredi', 'thursday' => 'Jeudi', 'friday' => 'Vendredi', 'saturday' => 'Samedi', 'sunday' => 'Dimanche' ]; $html = ''; foreach ($arrayDays as $dayEn => $dayFr) { $fieldDelivery = 'delivery_' . $dayEn; $fieldInfos = 'infos_' . $dayEn; if ($model->$fieldDelivery) { $html .= '' . $dayFr . ''; if (strlen($model->$fieldInfos)) { $html .= ' / ' . nl2br(str_replace(['[select_previous_day]', '[/select_previous_day]'], '', $model->$fieldInfos)) . ''; } $html .= '
'; } } return $html; } elseif ($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS) { $html = ''; $incomingDistributions = $distributionModule->findDistributionsIncoming(); $cpt = 0; foreach ($incomingDistributions as $distribution) { $countPointSaleDistribution = PointSaleDistribution::searchCount([ 'id_distribution' => $distribution->id, 'id_point_sale' => $model->id, 'delivery' => 1 ]); if ($countPointSaleDistribution) { $html .= strftime('%A %d %B', strtotime($distribution->date)) . '
'; } $cpt++; } return $html; } } ] ], ]); ?>

Produits

'photo', 'format' => 'raw', 'headerOptions' => ['class' => 'photo'], 'contentOptions' => ['class' => 'photo'], 'value' => function ($model) { if (strlen($model->photo)) { return ''; } return ''; } ]; } $columnsProducts[] = [ 'attribute' => 'name', 'format' => 'raw', 'contentOptions' => ['class' => 'name product-name-description-block'], 'value' => function ($model) { $html = '
' . Html::encode($model->name) . '
'; if (strlen($model->description)) { $html .= '
' . Html::encode($model->description).'
'; } if (strlen($model->recipe)) { $html .= '
En savoir plus
' . nl2br(Html::encode($model->recipe)).'
'; } return $html; } ]; if ($hasProductWeight) { $columnsProducts[] = [ 'attribute' => 'weight', 'format' => 'raw', 'value' => function ($model) { if (strlen($model->weight)) { return $model->weight . ' g'; } return ''; } ]; } $columnsProducts[] = [ 'attribute' => 'price', 'value' => function ($model) use ($productModule) { if ($model->price) { return Price::format($productModule->getPriceWithTax($model)) . ' (' . $productModule->getSolver()->strUnit($model, 'wording_unit', true) . ')'; } return ''; } ]; ?> query->count()) : ?> $dataProviderProducts, 'summary' => '', 'columns' => $columnsProducts ]); ?> id]->query->count()): ?>

name) ?>

$dataProviderProductsByCategories[$category->id], 'summary' => '', 'columns' => $columnsProducts ]); ?>