Translation:Altogether it's 500 yuan.
Look, both work in pretty much any scenario. Look up the word "altogether" in a dictionary. Yes, one major definition is "to the fullest extent" as you, JamesBacon have so gracefully demonstrated; however, another perfectly acceptable definition is "in total," or "in all." So if a man has three sources of income and you add up his annual total income, you could reasonably say, "Altogether he earns close to one million dollars." And if you think I'm crazy, I took that example straight from a dictionary, so it's reliable. "All together" is also really similar in meaning, but it is slightly different. I'm already making this too long, so I won't get too specific here. Essentially, it is used for a group that is acting or being acted upon all at once. So, one could say, "All together THEY cost 500 yuan," because you are considering a group that, when considered together, cost 500 yuan. I will now conclude by using both in the same sentence before punching myself in the face for getting so caught up in a random English semantics argument on the internet.
"All together they bought altogether 500 yuan worth of corn."
punches self unconscious
I am not entirely sure about what is correct and what not, but from this article http://grammarist.com/spelling/all-together-altogether/, it seems that "altogether" should work in this sentence
Honestly, I don't like this translation to "yuan." There is nothing about the Chinese sentence that dictates that it's yuan, and not USD or CAD or any other type of currency in the world, and as a Chinese-Canadian, I have never heard my parents refer to Canadian dollars by anything other than 块。
The english answer is wrong. It's a common english mistake to use altogether when you mean all together as two separate words. See here: https://brians.wsu.edu/2016/05/16/altogether-all-together/