Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2008
    Location
    Utah, USA
    Posts
    182
    Plugin Contributions
    10

    Default Call Order Date plus 5

    This is probably something simple I am overlooking, I have a client that wants to show the order date +5 in the admin. I have found where it calls the order date in the admin in control/orders.php

    Code:
    <td class="dataTableContent" align="center"><?php echo zen_datetime_short($orders->fields['date_purchased']); ?></td>
    Now I need to take that date purchased and add 5 days to it. I know this is completely wrong but something like
    Code:
    $ordered_date = zen_datetime_short($orders->fields['date_purchased']);
    $ordered_date_plus_five = $ordered_date+5;
    I know that is far from correct and I need to pull out the day of the date but just so you get the idea.. then I can call the $ordered_date_plus_five in the loop

    Any help would be nice!
    Thanks in advance!
    Zen Cart Help and Design

    If you don’t build your dream, someone else will hire you to help them build theirs.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Call Order Date plus 5

    order date in the admin in control/orders.php
    There is no folder named "control" is a default distribution
    Where/what created this?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,715
    Plugin Contributions
    123

    Default Re: Call Order Date plus 5

    I think "control" is his renamed admin panel. But remember that this is supposed to be a secret!
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,715
    Plugin Contributions
    123

    Default Re: Call Order Date plus 5

    @Brandon, Prior to calling zen_datetime_short, you should be adding 5 days to $orders->fields['date_purchased'].

    (5 * 24 * 60 * 60 is 5 days in seconds.)
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Dec 2008
    Location
    Utah, USA
    Posts
    182
    Plugin Contributions
    10

    Default Re: Call Order Date plus 5

    Quote Originally Posted by swguy View Post
    I think "control" is his renamed admin panel. But remember that this is supposed to be a secret!
    Ha good thing its just a test environment! :-)

    Quote Originally Posted by swguy View Post
    @Brandon, Prior to calling zen_datetime_short, you should be adding 5 days to $orders->fields['date_purchased'].

    (5 * 24 * 60 * 60 is 5 days in seconds.)
    I am having troubles adding 5 days to the $orders->fields['date_purchased']); any ideas how I would add to this?!?

    Thanks in advance for the help! :-)
    Zen Cart Help and Design

    If you don’t build your dream, someone else will hire you to help them build theirs.

  6. #6
    Join Date
    Dec 2008
    Location
    Utah, USA
    Posts
    182
    Plugin Contributions
    10

    Default Re: Call Order Date plus 5

    Got it!!

    For those that need to know (although I am not sure if any will)

    Code:
    $order_date_plus_five = zen_datetime_short(date('Y-m-d H:i:s', strtotime($orders->fields['date_purchased']) + 5 * 24 * 3600 ));
    Zen Cart Help and Design

    If you don’t build your dream, someone else will hire you to help them build theirs.

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,715
    Plugin Contributions
    123

    Default Re: Call Order Date plus 5

    Note that another way to do this would be to do it as part of the database query.

    SELECT date_add(date_purchased, INTERVAL 5 DAY) AS dayplus5 FROM orders;
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. order delivery date addon - date not showing in checkout
    By jagall in forum Addon Shipping Modules
    Replies: 4
    Last Post: 19 Oct 2017, 09:09 PM
  2. v154 How to call Today's Date?
    By Feznizzle in forum General Questions
    Replies: 8
    Last Post: 9 Dec 2015, 10:46 PM
  3. v139h Order date on Invoice is server date/time
    By Kenton in forum Managing Customers and Orders
    Replies: 3
    Last Post: 28 Feb 2012, 06:22 AM
  4. Stuck PayPal order plus creating duplicate store
    By LRS in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 6 Jul 2007, 05:23 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