News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Modify Order Numbers

Started by toad78, February 07, 2013, 00:19:55 AM

Previous topic - Next topic

toad78

I know this discussion has been posted and the last post of the conversation was on December, 2012 (so I assume it's a dead end if I posted there).

All I want to do is to keep things simple with the Order Numbers on the emails going out to the customer (the admin is fine). I understand, from what I read that the first four digits are automatically generated for security reasons. I get that. All I need to do is to display the last four digits on the emails that get sent out to the customers. That's all. Customers are rather confused when they see a 9-digit number (rather overwhelming for them).

I really don't care to spend money on a plugin if all I need is to modify this tiny thing for outgoing emails to customers.

Can someone simplify what I need to do to get this going correctly?

Also, I'm using Virtuemart Email Manager from InteraMind to send out emails, if that matters in the way the emails are posted (which I doubt considering it's using VM's [ORDER-NUMBER] tags.

Thank you.

reinhold

This plugin allows you to completely define the format of the order numbers (only for future orders, because for past orders the order number has already been sent to the customers):
http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions/virtuemart-orders/22803

If you want the numbering to start from some value other than 1, then you'll have to change one entry in the database (see the FAQ).

The problem with just displaying the last few digits of the VM-created ordernumber is not really a solution, since the ordernumber is also used as the username for viewing the order in the frontend, and it is contained in all links sent out in the mails.

What you can do, though, is to modify the Virtuemart file administrator/components/com_virtuemart/models/orders.php, in particular the function generateOrderNumber. Simply return $count instead of $data, and all new orders will simply use the running counter as their order number. Notice, however, that any virtuemart update might overwrite these changes (if the update changes the models/orders.php file) and you might have to do them again...

toad78

Thanks, reinhold:

QuoteWhat you can do, though, is to modify the Virtuemart file administrator/components/com_virtuemart/models/orders.php, in particular the function generateOrderNumber. Simply return $count instead of $data, and all new orders will simply use the running counter as their order number. Notice, however, that any virtuemart update might overwrite these changes (if the update changes the models/orders.php file) and you might have to do them again...


  • So there's no way to create a custom 'admin' template to minimize the chances of 'orders.php' getting overwritten?
  • Is there any other disadvantage to the Shop Admin for having '$data' changed to '$count'?


We obviously want to keep consistency with the links and I just want to make sure I'm not breaking anything.