Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2018
    Posts
    11
    Plugin Contributions
    0

    Default Scheduled posts' availability / Make public on a certain date

    Greetings,

    I was wondering for some time if it is possible to do the follow thing within the admin panel, being helped by plugins or whatsoever. I usually prepare news/products and I want them to publish on the next day at 0:00 AM. How does that one get to do that within Zen Cart? I guess I can create a custom php file with the help of CRON, too. But I was wondering if there is such a thing existing already.

    Simple:
    1) Prepare a publication/product.
    2) Submit it as not available (OFF) and choose a time and/or time to be switched to available (ON).
    3) When the right time comes, it becomes available to the public and the date it displays as added is the current date, not when prepared.

    Advanced:
    Might be done with the help of .php script, database columns (don't really know the structure of ZC) and CRON jobs.

    Thanks in advance! Looking forward to hearing your ideas.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Scheduled posts' availability / Make public on a certain date

    For each product's definition, there's a Date Available entry which, if not empty, identifies the date on which which the product is automatically made available at midnight.

    What plugin are you using for the news?

  3. #3
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Scheduled posts' availability / Make public on a certain date

    And then as far as the "date-added" information, that is a separate field that can be accessed with a sql statement or by adding the field to be displayed; however, is by default set with the information of when it was added/created.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jun 2018
    Posts
    11
    Plugin Contributions
    0

    Default Re: Scheduled posts' availability / Make public on a certain date

    I managed to do it myself:

    1) I added additional fields when creating "news" with document_general - enable delayed display and date for enabled display (YYYY-MM-DD HH-MM-SS)
    2) Created additional two db fields - "products_cron" with value 0 and 1, as if it was "enable delayed display" - ON and OFF, "products_cron_date" which is a field similar to products_date_modified and products_date_available.
    3) Edited and updated the files needed to make the connection between the php files and db update.
    4) Create a "crone php file" which updates products which meet the criteria of products with status off, products_cron = 1 TO status = 1, products_cron = 0, products_date_added = products_cron_date (current server time)
    5) Created a cron job which runs the php file from step. 4 at midnight.

 

 

Similar Threads

  1. Make product unavailable on certain date
    By jjensen in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Sep 2013, 04:39 AM
  2. Scheduled listing posting live prior to start date?
    By cvillardito in forum General Questions
    Replies: 2
    Last Post: 29 Sep 2011, 10:44 PM
  3. Banner Manager - Scheduled Date is Null
    By ksoup in forum General Questions
    Replies: 17
    Last Post: 9 Feb 2011, 02:56 AM
  4. Date Format for Product Availability
    By jorsara in forum General Questions
    Replies: 10
    Last Post: 21 Mar 2010, 09:48 PM
  5. Replies: 1
    Last Post: 5 Jul 2007, 06:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR