VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: hhtmp88 on December 04, 2014, 13:52:07 PM

Title: VM3: How to set the starting order number to 3000?
Post by: hhtmp88 on December 04, 2014, 13:52:07 PM
Dear all,

as titled.

Thanks for any kind of help!
Title: Re: VM3: How to set the starting order number to 3000?
Post by: GJC Web Design on December 05, 2014, 11:43:34 AM
http://www.open-tools.net/virtuemart-2-extensions/vm2-ordernumber-plugin.html
Title: Re: VM3: How to set the starting order number to 3000?
Post by: hhtmp88 on December 08, 2014, 04:52:09 AM
Quote from: GJC Web Design on December 05, 2014, 11:43:34 AM
http://www.open-tools.net/virtuemart-2-extensions/vm2-ordernumber-plugin.html
Thanks GJC for your comments!
but...
I just want to set the order number to 3000, any hints on this?

Thanks for any kinds of help!
Title: Re: VM3: How to set the starting order number to 3000?
Post by: reinhold on December 08, 2014, 12:30:20 PM
The default order number is hardcoded in Virtuemart (file administrator/components/com_virtuemart/models/orders.php, function generateOrderNumber) as:
  -) Count of existing orders in the database
  -) Plus the constant VM_ORDER_OFFSET

That constant offset VM_ORDER_OFFSET is defined in administrator/components/com_virtuemart/helpers/config.php with a value of 3.

So to change the default VM order number counter, all you can do is to modify that config.php file from the VM code base, which will, however, be overwritten when you update VM...

Best regards,
Reinhold
Title: Re: VM3: How to set the starting order number to 3000?
Post by: hhtmp88 on December 11, 2014, 05:51:43 AM
Thanks reinhold for your comments!
-> will try it out!