The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

% Discount Off An Order On This Date.

I cannot figure out how to give a fixed percentage discount on my site for one specified day. i.e., Visit this site today, buy something, get 25% off your order. No code needed, no coupons necessary, no questions asked, just place an order and get 25% off your purchase today.

Anyone know how to do this?
  • fc_adamfc_adam FoxyCart Team

    There are a couple ways you could approach this, but the best way would be to automatically add a coupon to the customer cart using javascript. You would do that by adding the following javascript to your own websites templates:
    <script>var FC = FC || {};
    FC.onLoad = function () {
    FC.client.on('ready.done', function () {
    if ( == 0) {
    That code will be executed on page load - and automatically add a coupon to the cart. You just need to update it to specify the coupon code you want to add. You can also set up the coupon start and end dates to limit to a certain time frame. They're inclusive - so if it's just one day, you'll want to set it to that same date for both settings. Also note, the date is based off of the server time which is US Pacific.
  • Thank you so much. I will give that a shot.
Sign In or Register to comment.