Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Rombouts 71 posts 265 karma points
    Apr 22, 2014 @ 13:05
    Peter Rombouts
    0

    Custom OrderNumber

    Hi,

    I'm trying to create my own 'OrderNumber' logic.

    Example:
    - Currently the prefix can be set, eg. ORDER-
    - Orders will be auto-numbered, ORDER-1, ORDER-2 and so on

    How can I override this logic?
    I cannot seem to find this in the documentation, and I cannot edit the OrderNumber property in the finalized events.

    Kind regards,
    Peter Rombouts

  • Anders Burla 2560 posts 8256 karma points
    Apr 22, 2014 @ 13:10
    Anders Burla
    0

    If you do it in the finalized event you will have to order.Save() again. It should be able in this event.

    Kind regards
    Anders

  • Peter Rombouts 71 posts 265 karma points
    Apr 22, 2014 @ 13:16
    Peter Rombouts
    0

    Hi Anders,

    How do we reset the counter?

    My goal is:
    - 20140001
    - 20140002
    And the next year:
    - 20150001
    - etc.

    Is there any way to automate this or make use of the API?
    We can build this ourselves, but we do not want to screw up the internals of TeaCommerce.

    Kind regards,
    Peter Rombouts

  • Anders Burla 2560 posts 8256 karma points
    Apr 22, 2014 @ 13:23
    Anders Burla
    0

    In the DB there is a field at the store DB table. CurrentOrderNumber. Just set the new value you want and recycle the app pool.

    You can make a small tool that updates this in the DB at the new year and recycle the website.

  • Peter Rombouts 71 posts 265 karma points
    Apr 22, 2014 @ 13:27
    Peter Rombouts
    0

    Hi Anders,

    We will let our software do the following:

    - 20140001
    - 20140002
    - 20150003

    This will ensure that the customer can see in what year the order has been placed, without having to write external tools that could fail.

    Thanks for the support,

    Kind regards,
    Peter Rombouts

Please Sign in or register to post replies

Write your reply to:

Draft