Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Denote First Time Customer

Denote First Time Customer 23 Apr 2017 01:13 #1

  • brickford5
  • brickford5's Avatar Topic Author
  • Offline
  • Posts: 1
Is there anyway to note a customers first order? ie normal order number would be 51516, 51517, 51518 etc. But if it is the customers first order on order 51517 the order number would be N51517.

I'm sure this is a little more custom, so if not an easy solution would you have a reference to anyone for hire for this kind of functionality?


Please Log in or Create an account to join the conversation.

Denote First Time Customer 23 Apr 2017 15:32 #2

Dear Brickford5,
You are not the first one to request such functionality. Fortunately, I have already implemented a little extension for our plugin that provides an additional variable UserOrderCount:

Please install that userordercount extension and enable it. This will prove the variable UserOrderCount for use in the number format and in the conditions for new variables/repleacements. Using this variable, you can define some custom number format for first-time orders:

If variable userordercount <= 1 THEN set variable ordernumber_format to N#|#

The variable userordercount will have value 0 for all orders from unregistered users (i.e. no new account created during the checkout) and value 1 for the first order of a registered customer.

The new ordernumber_format in my example above is "N#|#" and should in your case always have the form "N....|....", where .... is your exact ordernumber format. E.g. if you use an ordernumber format [year][month]-#, then the new format in your custom definition should be "#[year][month]-#|[year][month]-#". The repeated format after the | is required to force the counter to use the same counter as all other orders (i.e. ignore the N prefix in the order number). In particular, "N#|#" means: Display the number as N#, but let the counter increase as if the format were only #.
If you omit the |# part, then orders from new customers would have their own counter, which is probably not what you want.

Best regards,

Please Log in or Create an account to join the conversation.

  • Page:
  • 1

VM - Shopping cart


Cart empty

Login Formular