Totally Zenned
- Join Date:
- Jul 2012
- Posts:
- 16,908
- Plugin Contributions:
- 2
products_date_available no longer NULL
DigiBooks:
Thanks on both points .. firstly a former programmer seems to have added this reverse logic (which works) and I'm still trying to get my head around !!!!!
On your second point a switch would be the answer (I will check out the link you sent shortly).
I guess we are operating slightly differently to the norm so just to clarify:
Book 1 and Book 2 in THE TRILOGY are available, loaded on site and downloadable by subscribed members.
Book 3 is still being written and will be published in 9 months time .. but we have a description and often a book cover that we can load as 'teaser' with an Expected publication date of, say 1st September 2016. Book fails to publish by that date so under normal Zen-Cart rules it disappears from Expected Books because the date is set back to Null. As users we suddenly lose the teaser .. as Admins we no longer get reminded to seek Book 3 out - hence the reason we need to see it as Overdue.
When Book 3 is eventually published us Admins can load it for the members and remove the Expected Date and it all goes live.
Nothing can magically appear as it has to be manually made live in the catalog as a downloadable file.
Hopefully our simplistic method helps with what we're trying to achieve.
And thanks again :)
Yeah, it seemed like the layout of product listing was about what I was thinking. The added "feature" would offer a middle ground so that if the product were available to you (but not to others/public) then the default ZC code could take over...
As to the "reverse" logic, the $upcoming_date_check variable is not shown above as what it equals... That should be something either just above that series of checks or in the applicable pages directory... Old friend of developers toolkit ought to show where it is assigned it's value... An important thing to notice which it seems that you have applied is that in the assignment part (when true) the $upcoming_date_check variable is not used which leads me to think/believe that it is not solely the value of the future date and therefore is a bit of a source to your consternation...
Once you come to realize how similar php is to all the other languages you referenced, while some of the "mystery" will go away, it should be significantly easier for you to operate... I mean yeah it's uniquely designed for what it is used for, but pick up a php book and you'll see the same old schtick... hello world, for loops, while loops, if structure, etc... The rest is just different ways of having "containers", there's a lot more use of classes than perhaps some of the "older" code, but really... Not too much to handle if you can do the others. :)