My SellerDeck Account | Newsletter | Free Trial

Community and Knowledge Base

  #1  
Old 04-Dec-2017, 04:49 PM
Sheltons Sheltons is offline
Registered User
Join Date: Jan 2014
Full Name: John Pike
Posts: 36
Thanks: 2
Thanked 3 Times in 2 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 Fishing Tackle
www.sheltonsfishing.co.uk
Reply With Quote
  #2  
Old 04-Dec-2017, 07:40 PM
NormanRouxel's Avatar
NormanRouxel NormanRouxel is offline
Registered User
Join Date: Dec 2002
Full Name: Norman Rouxel
Posts: 10,752
Thanks: 9
Thanked 734 Times in 617 Posts
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
Reply With Quote
  #3  
Old 05-Dec-2017, 07:23 AM
Sheltons Sheltons is offline
Registered User
Join Date: Jan 2014
Full Name: John Pike
Posts: 36
Thanks: 2
Thanked 3 Times in 2 Posts
Quote:
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 Fishing Tackle
www.sheltonsfishing.co.uk
Reply With Quote
  #4  
Old 05-Dec-2017, 10:39 AM
Mike Hughes Mike Hughes is offline
Registered User
Join Date: Jan 2003
Full Name: Mike Hughes
Posts: 7,963
Thanks: 258
Thanked 442 Times in 390 Posts
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

-----------------------------------------
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 08:02 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.