Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How to Change Invoice Number to YYYYMMDDxxxx?

    When clients bring me this sort of request, my first question is usually "how many more sales will you get from this?"

    There's no obvious reason why this shouldn't work, but it's also not clear that there's business benefit that warrants spending more than a couple of minutes on it.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  2. #12
    Join Date
    Jan 2012
    Posts
    30
    Plugin Contributions
    0

    Default Re: How to Change Invoice Number to YYYYMMDDxxxx?

    Try to just have the date in the invoice number 201201150000001
    Copy and pasted the code in the first thread......not working

    <td class="main"><b><?php echo ENTRY_ORDER_ID . $oID . '-' . date(Y,strtotime($order->info['date_purchased'])) ; ?></b></td>

    What is wrong?

    I don't want it to say date purchased if that is what is going to happen too.

  3. #13
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to Change Invoice Number to YYYYMMDDxxxx?

    What exactly do you mean by "not working"? Does it do anything? The code as posted will give some custom text and the order number followed by date. What you want would take something like this
    PHP Code:
    <td class="main"><b><?php echo date('Ymd',strtotime($order->info['date_purchased'])) . $oID?></b></td>
    Also, as mentioned, this will not affect the actual order number at all, or its display in any other location. If you really want the order number itself to work as described, you could schedule a cron job to run at midnight every day and reset the next order number to the date as shown plus whatever quantity of zeros.

  4. #14
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to Change Invoice Number to YYYYMMDDxxxx?

    I don't know if it's compatible with ZC admin control of the db, but this article may be useful to someone wanting to actually identify order numbers by time period: Working with MySQL Events

    I reset order numbers each year, so this year's orders start like 120001. Sites with higher order frequency may want different criteria.
    See Admin->Tools->Store Manager to reset order numbers.

  5. #15
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How to Change Invoice Number to YYYYMMDDxxxx?

    Quote Originally Posted by racinjason View Post
    Try to just have the date in the invoice number 201201150000001
    Copy and pasted the code in the first thread......not working

    <td class="main"><b><?php echo ENTRY_ORDER_ID . $oID . '-' . date(Y,strtotime($order->info['date_purchased'])) ; ?></b></td>

    What is wrong?

    I don't want it to say date purchased if that is what is going to happen too.
    The code as posted won't work because the the first parameter in the date function needs to be in quotes.

    This would be easier to diagnose if you explained where you'd put the code, and specifically what symptoms, results or lack of them lead you to conclude that it's "not working".
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #16
    Join Date
    Feb 2012
    Posts
    10
    Plugin Contributions
    0

    Default Re: How to Change Invoice Number to YYYYMMDDxxxx?

    Have been reading the post here and have a question..
    What if all we wanted was to put a prefix to the order number i.e. "w1000" ? How would that be done? thru the database or code?
    Thanks!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Can I have secondary invoice number based on date? YYYYMMDDxxxx
    By gsmsalers in forum General Questions
    Replies: 4
    Last Post: 9 Oct 2013, 07:00 AM
  2. How to modify BSB number in the online invoice?
    By didart in forum Basic Configuration
    Replies: 2
    Last Post: 11 May 2012, 02:10 AM
  3. How can I change the number of the invoice?
    By bryancsparks in forum General Questions
    Replies: 1
    Last Post: 1 Mar 2010, 12:10 AM
  4. reset / change invoice number
    By asappia in forum General Questions
    Replies: 1
    Last Post: 30 Jan 2009, 06:09 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