Code: Select all
<?=
($p->get('status') == '1')
? '<i class="fas fa-check-circle text-success"></i> <a href="' . tep_href_link('categories.php', 'action=setflag&flag=0&pID=' . $p->get('id') . '&cPath=' . $cPath) . '"><i class="fas fa-times-circle text-muted"></i></a>'
: '<a href="' . tep_href_link('categories.php', 'action=setflag&flag=1&pID=' . $p->get('id') . '&cPath=' . $cPath) . '"><i class="fas fa-check-circle text-muted"></i></a> <i class="fas fa-times-circle text-danger"></i>'
?>
The reason is, that a shop I help out represents stock that is in remote storage, and thus have a longer estimated shipping time. Sometimes stock in the actual store is sold out, while there is still stock at the remote warehouse, meaning the product could be turned from active ('1') to active in remote storage ('2') instead of inactive ('0') and impossible for the customers to buy.
Another reason is, that the same shop has a physical store, but no way of keeping track of the actual stock. Instead of going into the product-edit each time a product is sold, it would be nice to just click on of those small status-buttons, making it temporarily sold out ('3'), which on front end would be targeted to remove the buy-buttons, and add opacity to the image.
This is already done on the webshop, but by abusing the core-code of 1.0.4.0. Thus, I'm wondering if this is possible with hooks or other magic, and if there is any reason for only having two options for the product status?
//Daniel