% 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?
Tagged:
Comments
  • fc_adamfc_adam FoxyCart Team
    @RCondemi,

    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 (FC.json.coupons.length == 0) {
    FC.client.request('https://'+FC.settings.storedomain+'/cart?coupon=YOUR_COUPON_CODE');
    }
    });
    };</script>
    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.