mrhut10 / futuresFineFurniture

futuresFineFurniture ecom website

Home Page:https://futuresfinefurnitureandbedding.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add specials

mrhut10 opened this issue · comments

  • add discount expiry field to products
  • add logic to handle discount dropping after expirery date
  • ensure this logic works with the snipcart.json file generated
  • either of the below
    • add a daily build script to ensure that snipcart.json is kept upto date with specials
    • create multiple snipcart.json files for each post expiry date and switch the snipcart file within the component from the date (however this could be manipulated client side so first option is prefered

@mrhut10 For the build script — I’ve had success with creating a webhook in Netlify that gets triggered every day in Zapier for a site rebuild (to pull down new images from Instagram)

nice, yeah i think something like that would be good.
I'll need to specify Australian time in the code base and then kick off a build at 1 past midnight or something.

and that was fast @lukebennett88 seeing this :)

things i have to do before i attempt this

  • add some new products
  • make up a monthly special email template in mailchimp
  • create a email with specials for June

then i can work out a way to both

  • display monthly specials on website
  • rebuild daily monthly to handle specials expiring

Haha, I got an email about you closing the previous issue 😉

I think Zapier let’s you pick the Timezone BTW.

mmm the timezone in zapier is good,
however the logic that a special has expired in code-base i think will still need to be set. I'll likely just set as a environmental in netlify

I found moment.js is super useful for date based things.
It’s a fairly large library, but from my testing Gatsby does remove all the unused code on build.

oh nice, yep i've heard thats popular i'll give it a wack :)

putting this one on hold, as have a few other priorities