Let me try to explain myself.
So, I have several sites where I use CS-Cart but I do customer support for all sites combined. When customers call me, I often ask, “what site are you referring to?”, so I don’t mix up orders. Sometimes they know, sometimes they don’t.
Is there anyway, I can add a prefix to each order number, so it appears as, let’s say RG11432, instead of 11432? I notice with three carts, I am having three orders listed as 11432 and when people call and say their order# is 11432, it creates some confusion. If I could add a prefix, it would make it easier.
One option is to change the invoice file for each site
/skins/<>/mail/orders/invoice.tpl
```php
{if $doc_id_text}{$doc_id_text}
{/if}{$lang.order} #{$order_info.order_id}
```
```php
{if $doc_id_text}{$doc_id_text}
{/if}{$lang.order} #RG{$order_info.order_id}
```
[quote name='kogi' timestamp='1314349898' post='120402']
One option is to change the invoice file for each site
/skins/<>/mail/orders/invoice.tpl
```php
{if $doc_id_text}{$doc_id_text}
{/if}{$lang.order} #{$order_info.order_id}
```
```php
{if $doc_id_text}{$doc_id_text}
{/if}{$lang.order} #RG{$order_info.order_id}
```
[/quote]
I would like to do the same thing. I wish there was a solution that did this automatically with a simple setting in the admin rather than have to mess with editing templates because then you also have to edit
the mail file, and the one shown on the website as well.
Want to reopen this conversation because with 4.0, this is even more important. Right now I get calls and the customer says, “order # 8989” and I don't know what site they purchased it from til I looked it up. I would love for them to say “RG8989” for instance because RG would reference my site for me and my support staff.
The solution above works on the invoice but the problem is, it doesn't change it on the ORDER CONFIRMATION page.
This needs to be a “post processing” function to add a prefix to an order_id.
Order_id's are integers in the DB and are auto_incremented. So you need to have hooks in place that will change the order_id in the data between when it is fetched from the DB and when it is made available to the templates (pages, mail, etc.). There may be some assumptions within the system that expects an order_id to be an integer.
If you go this route, you should be prepared to spend a bunch of time adding the prefix to the multitude of places where order data is fetched (by order_id of course) and then even more time to catch all the “corner cases” that were not obvious when you started.
In reality, it might be a lot easier to find all references in the templates to '$order_id' and change them to '$company_prefix$order_id' and then set $company_prefix appropriately in controllers/common/init.post.php.
Hope this helps and yes, especially with muti-store, having order_id prefixes would be a plus. They support this for many payment providers already.
You could use first 1 or 2 digits of the order number as the website identifier by reseting the invoice start number for each site. eg: site 1 could be 100000, 100001,… – Site 2 could be 200000, 200001,…
– site 13 could be 1300000, 1300001, …
Hi,
Greetings from Chilliapple
We can help you by providing a custom add-on which will add a prefix to Order and Invoice of the website. Required Prefix will be managed by admin.
Please confirm, if this is required.
Regards,
Vishakha
As a short term fix.
In settings general.
Site 1 start order number at 5,000
Site 2 start order number at 15,000
etc
DOH !!
Sorry. Should have read ALL the posts.
Sorry Chip.
Hi
Would the simple way to do this is ad some text to the invoice.tpl Just before the order number or after the order number and make this unique per site.
So order #660 would show on customer invoice as #660 RG or RG #660
Alan