I'm trying to create a 25% discount code for the whole cart, not just for one product. Is this possible? I'm pretty new to Magento and the only rules I find is either a percentage for one product or for the whole cart, but then it's accessible even without a code.
You can just create a cart price rule for this. It will do the job.
Just refer this link. **
** if you are on magento 2