What is the plat form (Eg. Magento, WordPress) you are using?
If Magento you can do it from Promotion rules from BE
Check first, weather you can do it from default
Else get a free extensions from relevant sites
I can finish it within two days, If any coding works
Thanks
Aaqil