Commit 79258b8f58514485c00970a08f3b9f438585936d

Authored by Alexey Boroda
1 parent f7e80ab1

-Order print fixed

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
views/order/print.php
@@ -147,9 +147,11 @@ use yii\widgets\DetailView; @@ -147,9 +147,11 @@ use yii\widgets\DetailView;
147 * @var OrderProduct $model 147 * @var OrderProduct $model
148 */ 148 */
149 $value = ''; 149 $value = '';
150 - foreach ($model->productVariant->properties as $property) { 150 + if (!empty($model->productVariant)) {
  151 + foreach ($model->productVariant->properties as $property) {
151 $value .= $property->lang->title.':'.implode(',', ArrayHelper::getColumn($property->customOptions, 'lang.value')).'<br />'; 152 $value .= $property->lang->title.':'.implode(',', ArrayHelper::getColumn($property->customOptions, 'lang.value')).'<br />';
152 } 153 }
  154 + }
153 return $value; 155 return $value;
154 }, 156 },
155 'format' => 'html', 157 'format' => 'html',