Skip to content

Commit

Permalink
check if product exists so that we dont fail
Browse files Browse the repository at this point in the history
  • Loading branch information
proditis committed Nov 18, 2024
1 parent 181333a commit 386a968
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/modules/sales/views/price/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
'format'=>'raw',
'contentOptions'=>['style'=>'white-space: nowrap;'],
'value'=>function($model){
if($model->product)
return sprintf('<small><abbr title="%s">%s</abbr></small>',$model->product_id,$model->product->name);
else
return sprintf('<small class="text-danger"><abbr title="Product %s does not exist">%s</abbr></small>',$model->product_id,$model->product_id);
}
],
'recurring_interval',
Expand Down

0 comments on commit 386a968

Please sign in to comment.