Prevent type-casting warning when a Product has no price.
This commit is contained in:
parent
5b8cfe7a38
commit
eed390e96b
1 changed files with 1 additions and 1 deletions
|
|
@ -306,7 +306,7 @@ sub view {
|
|||
my $sku = $asset->get;
|
||||
$sku->{url} = $asset->getUrl;
|
||||
$sku->{thumbnailUrl} = $asset->getThumbnailUrl;
|
||||
$sku->{price} = sprintf("%.2f", $asset->getPrice);
|
||||
$sku->{price} = sprintf("%.2f", $asset->getPrice ? $asset->getPrice : 0);
|
||||
$sku->{addToCartForm} = $asset->getAddToCartForm;
|
||||
push @skus, $sku;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue