Announcement

Collapse
No announcement yet.

Products Activated by Date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Products Activated by Date

    We want to get ahead with Sale Items and get them on the site a week earlier but don't want to be up at midnight to activate sale items and then do an upload. If we could put all the items on live ready but the 'order button disabled' until Midnight 26/12/17 it would make life a lot easier.

    So is there away using the PHP to say if DateTime > 26/12/2017 23:59 then product can be ordered (activate order button).

    If so all I need would be the PHP and I'm sure I culd find the right spot (buy button) to place the block. We have a test site so I can play around with it.

    John.
    John
    Sheltons of Peterborough Ltd
    www.sheltonsfishing.co.uk

    #2
    SellerDeck's PHP works on your backoffice PC when building the site's pages. So only affects pages when they are uploaded. While you could use it you'd still have to do an upload to activated the dated items.

    PHP can be used in a BlockIf so here's some that would do what you want:
    Code:
    (getdate()['mon'] == 12 AND getdate()['mday'] > 26)
    OR
    (getdate()['year'] >= 2018)
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Originally posted by NormanRouxel View Post
      SellerDeck's PHP works on your backoffice PC when building the site's pages. So only affects pages when they are uploaded. While you could use it you'd still have to do an upload to activated the dated items.

      PHP can be used in a BlockIf so here's some that would do what you want:
      Code:
      (getdate()['mon'] == 12 AND getdate()['mday'] > 26)
      OR
      (getdate()['year'] >= 2018)
      Hi Norman,
      thanks, I do understand what you are saying and I suspected that might be the case when I couldn't find anything that resembled the Database being uploaded.

      It's a real shame you can't do things on the fly but I guess their way makes the site more secure?

      Thanks again.
      John.
      John
      Sheltons of Peterborough Ltd
      www.sheltonsfishing.co.uk

      Comment


        #4
        It is possible to hide the buy button with javascript until the required date and time but then all anyone would have to do is disable javascript to see it so you'd probably also want to make the buy button use javascript to submit the form. Which all makes it a little bit messy and would only allow people with javascript enabled to order the sales items. (does anyone not have javascript enabled these days?)

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment

        Working...
        X