try{
write your code in try block
$imgSrc = $_product->getImageUrl();
}
catch(Exception $e) {
// catch your exception here
$imgSrc = '0';
}
write your code in try block
$imgSrc = $_product->getImageUrl();
}
catch(Exception $e) {
// catch your exception here
$imgSrc = '0';
}
Comments
Post a Comment