I personal had an AK-47 with a foldable stock which I loved, but a part broke on the stock and I couldn't find that part as they didn't make it separately.
So I decided to change it (something similar to what you did). I found the easiest way to do so was to just buy a new gun kit, you can find kits all over the internet and internal parts too. I personally was able to take it completely apart and build it myself, though it wasn't always so straight forward. Maybe you could consider doing it yourself but going to your local airsoft store and ask for help / tips. It's what I did and they were really helpful.
You just need to make sure the kit you buy or what you have is compatible with those parts. For example, with the stock, you have to make sure how you put it on (i.e. connect it on) is correct for that stock. another thing to keep in mind is where the battery and wires go. I personal had to make a lot of adjustments to the where everything went. had to buy a new battery because otherwise it wouldn't fit. Hope this helps.