added alert to index; can be called through pathname param
added guard to avoid error
added alert param to add-to-order href