provide a template var that will tell the user when there are no available variants for sale. Out of stock

This commit is contained in:
Colin Kuskie 2008-06-06 21:16:52 +00:00
parent 0a35d8e6c9
commit bff85b56d0
3 changed files with 24 additions and 1 deletions

View file

@ -1554,6 +1554,11 @@ sub view {
},
);
$var{buy_button} = WebGUI::Form::submit($session, { value => $i18n->get('add to cart') } );
$var{inStock} = 1;
}
else {
$var{in_stock} = 0;
$var{no_stock_message} = $i18n->get('out of stock');
}
if ($self->canEdit) {
$var{'addvariant_url'} = $self->getUrl('func=editVariant');