Quellcode durchsuchen

Merge branch 'dev'

master
Guillaume vor 3 Jahren
Ursprung
Commit
a9a856c901
6 geänderte Dateien mit 64 neuen und 14 gelöschten Zeilen
  1. +2
    -1
      producer/controllers/OrderController.php
  2. +26
    -3
      producer/controllers/SiteController.php
  3. +1
    -0
      producer/views/order/confirm.php
  4. +14
    -6
      producer/views/site/index.php
  5. +12
    -4
      producer/web/css/screen.css
  6. +9
    -0
      producer/web/sass/site/_index.scss

+ 2
- 1
producer/controllers/OrderController.php Datei anzeigen

@@ -364,6 +364,8 @@ class OrderController extends ProducerBaseController
// sauvegarde de la commande
$order->save();

$order->initReference() ;

$order->changeOrderStatus('new-order', 'user');

// ajout de l'utilisateur à l'établissement
@@ -507,7 +509,6 @@ class OrderController extends ProducerBaseController
}

$order->setTillerSynchronization() ;
$order->initReference() ;
}



+ 26
- 3
producer/controllers/SiteController.php Datei anzeigen

@@ -40,6 +40,7 @@ namespace producer\controllers;

use common\helpers\GlobalParam;
use common\models\Producer;
use common\models\ProductCategory;

class SiteController extends ProducerBaseController
{
@@ -103,16 +104,36 @@ class SiteController extends ProducerBaseController
]);

// produits
$categoriesArray = ProductCategory::searchAll([], ['orderby' => 'product_category.position ASC']) ;
$dataProviderProductsByCategories = [] ;
foreach($categoriesArray as $category) {
$dataProviderProductsByCategories[$category->id] = new ActiveDataProvider([
'query' => Product::find()
->andWhere([
'id_producer' => $this->getProducer()->id,
'active' => true,
])
->andWhere('product.id_product_category = :id_product_category')
->params([':id_product_category' => $category->id])
->orderBy('order ASC'),
'pagination' => [
'pageSize' => 500,
],
'sort' => false,
]);
}

$queryProducts = Product::find()
->andWhere([
'id_producer' => $this->getProducer()->id,
'active' => true
'active' => true,
])
->orderBy('order ASC') ;

$dataProviderProducts = new ActiveDataProvider([
'query' => $queryProducts,
'pagination' => [
'pageSize' => 50,
'pageSize' => 500,
],
'sort' => false,
]);
@@ -132,10 +153,12 @@ class SiteController extends ProducerBaseController
}

return $this->render('index', [
'dataProviderProductsByCategories' => $dataProviderProductsByCategories,
'dataProviderPointsSale' => $dataProviderPointsSale,
'dataProviderProducts' => $dataProviderProducts,
'hasProductPhoto' => $hasProductPhoto,
'hasProductWeight' => $hasProductWeight
'hasProductWeight' => $hasProductWeight,
'categories' => $categoriesArray,
]);
}


+ 1
- 0
producer/views/order/confirm.php Datei anzeigen

@@ -67,6 +67,7 @@ $producer = GlobalParam::getCurrentProducer() ;
<div class="row">
<div class="col-md-6">
<ul>
<?php if($order->reference && strlen($order->reference) > 0): ?><li><span class="glyphicon glyphicon-check"></span> Commande N°<strong><?= Html::encode($order->reference); ?></strong></li><?php endif; ?>
<li><span class="glyphicon glyphicon-time"></span>Le <?= date('d/m/Y',strtotime($order->distribution->date)) ?></li>
<li><span class="glyphicon glyphicon-map-marker"></span><?= Html::encode($order->pointSale->name) ?><?php if(strlen($order->pointSale->name)): ?>
<br />&nbsp; &nbsp; &nbsp;<span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?></li>

+ 14
- 6
producer/views/site/index.php Datei anzeigen

@@ -192,12 +192,20 @@ $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ;
return '' ;
}
] ;

?>

<?= GridView::widget([
'dataProvider' => $dataProviderProducts,
'summary' => '',
'columns' => $columnsProducts
]); ?>
<?= GridView::widget([
'dataProvider' => $dataProviderProducts,
'summary' => '',
'columns' => $columnsProducts
]); ?>

<?php foreach($categories as $category): ?>
<h4><?= Html::encode($category->name) ?></h4>
<?= GridView::widget([
'dataProvider' => $dataProviderProductsByCategories[$category->id],
'summary' => '',
'columns' => $columnsProducts
]); ?>
<?php endforeach; ?>
</section>

+ 12
- 4
producer/web/css/screen.css Datei anzeigen

@@ -643,20 +643,28 @@ termes.
.site-index #points-sale .days small {
color: gray;
}
/* line 75, ../sass/site/_index.scss */
/* line 76, ../sass/site/_index.scss */
.site-index #products h4 {
font-family: "highvoltageregular";
font-size: 22px;
line-height: 30px;
padding-top: 13px;
text-transform: uppercase !important;
}
/* line 84, ../sass/site/_index.scss */
.site-index #products td.photo {
width: 100px;
}
/* line 77, ../sass/site/_index.scss */
/* line 86, ../sass/site/_index.scss */
.site-index #products td.photo img.photo-product {
width: 120px;
height: auto;
}
/* line 83, ../sass/site/_index.scss */
/* line 92, ../sass/site/_index.scss */
.site-index #products .name {
color: #333;
}
/* line 85, ../sass/site/_index.scss */
/* line 94, ../sass/site/_index.scss */
.site-index #products .name .the-name {
font-family: "capsuularegular";
font-size: 20px;

+ 9
- 0
producer/web/sass/site/_index.scss Datei anzeigen

@@ -72,6 +72,15 @@ termes.
}
#products {

h4 {
font-family: "highvoltageregular" ;
font-size: 22px ;
line-height: 30px ;
padding-top: 13px ;
text-transform: uppercase !important ;
}

td.photo {
width: 100px ;
img.photo-product {

Laden…
Abbrechen
Speichern