Hmm... it looks that OEBB has this specific problem with Zagreb only, for example "Ljubljana" works ok. So probably the best way to go here is to write to OEBB and request your Spar ticket via email (they give you code and you print the ticket at any OEBB ticket machine).
Concerning discounts - those available only with regular standard price tickets and not Spar ticket. And usually such discounts are much lower than difference between Spar and standard fare, so here you've got a choice - either purchase discounted Spar ticket in advance or to purchase regular ticket with group, senior etc. discount (these tickets can be bought any time - even 10 minutes before departure)
Concerning Ljubljana-Wien - cheapest option is 29 euro Spar ticket (
http://www.slo-zeleznice.si/en/passengers/abroad/austria), but SZ doesn't sell international tickets online, so... no real option here