Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Nov 2007
    Location
    USA
    Posts
    874
    Plugin Contributions
    5

    Default Set future Product Availability Date For All Products?

    Seasonal Shop to open next month. Looking to create future product availability dates for all products.

    Change 'Product Added Date' to future date; where?


    P i n g u i c u l a . S t o r e
    Last edited by Webskipper; 15 Feb 2021 at 12:14 AM. Reason: sp
    Cheers!
    v2.0+

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: Set future Product Availability Date For All Products?

    Badkup first, but you might want to try
    Code:
    UPDATE products
    SET products_date_available = 'yyyy-mm-dd';
    Replace the letters for the year, month, and day respectfully.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Set future Product Availability Date For All Products?

    Quote Originally Posted by dbltoe View Post
    Badkup first, but you might want to try
    Code:
    UPDATE products
    SET products_date_available = 'yyyy-mm-dd';
    Replace the letters for the year, month, and day respectfully.
    Since the products_date_available is a datetime field, you should also include the time-related elements (00:00:00 through 23:59:59), e.g.
    Code:
    UPDATE products
    SET products_date_available = 'yyyy-mm-dd 00:00:00';

  4. #4
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Set future Product Availability Date For All Products?

    Quote Originally Posted by Webskipper View Post
    Seasonal Shop to open next month. Looking to create future product availability dates for all products.

    Change 'Product Added Date' to future date; where?


    P i n g u i c u l a . S t o r e
    Note how the solutions provided reference ths products_date_available field. This field is what is used to control when to let the product become available or to show that it was previously set and has become available.

    The field asked about, products_date_added is a different field where the result is simply displayed if turned on. It also helps with identifying what product to show in the new products grouping...

    Hiding the product or limiting the interaction of a product until a future date is different than when the product is considered new to the store.

    The products_date_available field identified in the sql queries above is found on the product information page towards the top of the page. The products_date_added is generally calculated when the product is added to the database and is not made to be "freely" modified. I mean, once it is added, that's when it was added right? That doesn't mean that there are not other ways to adjust the value. Dbltoe has provided that for products_date_available. A similar query could be used for products_date_added if necessary.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Nov 2007
    Location
    USA
    Posts
    874
    Plugin Contributions
    5

    Default Re: Set future Product Availability Date For All Products?

    Add the code as an sql patch?

    Just getting back on the horse; coding.

    Thanks in advance.
    Cheers!
    v2.0+

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Set future Product Availability Date For All Products?

    Quote Originally Posted by Webskipper View Post
    Add the code as an sql patch?

    Just getting back on the horse; coding.

    Thanks in advance.
    One place it can be executed is:
    admin->tools->Install SQL Patches

    Statement must end with a semi-colon to execute. But remember backup the database before running any of those statements.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Nov 2007
    Location
    USA
    Posts
    874
    Plugin Contributions
    5

    Default Re: Set future Product Availability Date For All Products?

    Well, that worked. Thanks!

    "This product will be in stock on Monday dd-mm-yyyy"

    Got one success line and one incomplete asking for a semicolon even though it was included as is with the time.

    admin->tools->Install SQL Patch

    UPDATE products
    SET products_date_available = 'yyyy-mm-dd 00:00:00';
    Last edited by Webskipper; 17 Feb 2021 at 12:15 AM. Reason: sp
    Cheers!
    v2.0+

  8. #8
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Set future Product Availability Date For All Products?

    Quote Originally Posted by Webskipper View Post
    Well, that worked. Thanks!

    "This product will be in stock on Monday dd-mm-yyyy"

    Got one success line and one incomplete asking for a semicolon even though it was included as is with the time.

    admin->tools->Install SQL Patch

    Code:
    UPDATE products SET products_date_available = 'yyyy-mm-dd 00:00:00';
    Yeah, guess no one said to try to enter the content as a single line (even if it wraps around to a new line the absence of a "return" is important).

    Hopefully though the yyyy-mm-dd was changed to something like 2021-02-20. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Nov 2007
    Location
    USA
    Posts
    874
    Plugin Contributions
    5

    Default Re: Set future Product Availability Date For All Products?

    LOL. Yes, actual date does appear. Just keeping it general for the next programmer.
    Cheers!
    v2.0+

  10. #10
    Join Date
    Nov 2007
    Location
    USA
    Posts
    874
    Plugin Contributions
    5

    Default Re: Set future Product Availability Date For All Products?

    Is there an update to this? Doesn’t work since the PHP update this Summer. Thanks again; in advance.

    admin->tools->Install SQL Patch

    Code:

    UPDATE products SET products_date_available = 'yyyy-mm-dd 00:00:00';
    Cheers!
    v2.0+

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. who set my all my products date available at 1970-01-01?
    By andy2012 in forum General Questions
    Replies: 1
    Last Post: 18 Aug 2012, 10:41 AM
  2. Help cant get product to be unavailable until a future date
    By bluebikerboy1 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 30 Dec 2011, 06:54 AM
  3. Expected date products - change date for all.
    By navido in forum General Questions
    Replies: 2
    Last Post: 8 Nov 2010, 06:06 PM
  4. Date Format for Product Availability
    By jorsara in forum General Questions
    Replies: 10
    Last Post: 21 Mar 2010, 09:48 PM
  5. Can Future Product Availability Not Be ordered?
    By thevintagesound in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 12 Feb 2008, 10:45 PM

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