Many cars have piston slap and are driven for long amounts of time. So, if you tolerate the noise, there's still some troublefree kilometers ahead of you. If you want to see examples of that, just google for "chevrolet piston slap" or "gm piston slap". People generally don't like the piston slap condition as you can see from the search results, but it doesn't mean your engine will die tomorrow.
The Volkswagen 1.4 litre non-turbocharged engine also had a piston slap problem. It was due to Teflon coating on the piston skirts wearing away. Lots of people have driven these slapping cars for long distances, no problems.
The solution to the piston slap problem is to replace the short block. Just replacing the pistons won't be enough as the cylinder walls are probably also worn. This will cost you several thousands of euros/dollars depending on the engine. Usually, this kind of replacement doesn't make sense unless the engine is so damaged that it perhaps burns significant amounts of oil, perhaps fails emissions, perhaps has fuel economy problems.
If piston slap is very common on your engine (such as due to poorly designed piston skirt coatings), the replacement of the short block may mean the problem will appear again, as the replacement short block is also prone to the condition.
I once purchased a 1.4 litre Volkswagen car that had piston slap condition that the seller hid away probably by pouring oil via the spark plug holes. If I had noticed the piston slap condition before the sale, I wouldn't have bought the car. The piston slap was so bad that it didn't go away when the engine was warm. I soon figured out nobody wants an old piston slapper, so I drove the car for a short while, and then replaced it with a new car and scrapped the old car. Yet, the car still started every time, and drove perfectly, albeit with a huge oil consumption and a horrible noise. It was worse than an old diesel even though it wasn't a diesel!
One thing you could do but I don't recommend it is to pour oil via the spark plug holes and sell the car. We don't need any more inhonest people, so please, don't do this!