How to edit subject of confirmation order e-mail?

Hey guys,

I've been searching for a solution to my problem for over an hour, unfortunately I just can't find out what's wrong - how do I edit the sbuject of the confirmation order e-mail?

I thought it will be in translations, however when I searched for "Order #" or "email_", I can't find any translations for the subject.

I need to change it because the order numbers are not correct in the subject (apparently when you delete an order, the system won't allow a new order to be created, so I had to manually add new DB entries so the ID 1 and 2 would be in the system - the first two being test orders), so I want to remove them from it.

Anyone know the answer?

The subject will have the order ID of the order that it's processing. A wrong order ID seems highly unlikely to me.

The translation for the subject is "title_order_confirmation" but according to the ent_order.inc.php (find it in includes\entities) it will simply fetch the order ID from the order that it's processing, and prepend that to the translation. 

I can only imagine that the order ID that's being mentioned in the subject, corresponds with the order ID as it is in your order overview. 

How did you remove the test orders from the system? Also, for testing purposes, use a separate development environment and use the '[url=https://www.litecart.net/en/addons/33/deploy-changes]Deploy Changes[/url]' addon :)

Hey Johnny! Thanks a lot for the answer.

I removed the test orders by simply pressing "Delete" in LiteCart UI. At first I wanted to do it through phpmyadmin, but as I saw there is the option, I did it in the system, thinking the new order will replace the old ID, so we can start from 0.

Unfortunately since deleting it via LiteCart UI, testing as customer I couldn't make a new order, as it said the ID isn't found in DB (the Delete button purged it I think) so I had to manually enter new entries in my DB with the correspondent IDs in order to make it work.

Everything else is already set up and working, so instead of making the whole thing from scratch again + adding the template fresh, I decided to just edit the test order's info, print it out and just let my accountant cancel it, so we can start with n. 10 instead of 1, since they can't be deleted.

Hope it's not too complicated, but I'll look into ent_order.inc.php and try to make it not output the order number in e-mail, so that should solve it for me hopefully :)

Attaching screenshot of the miscalculated order confirmation e-mail. It's in Czech though, but you can see in the subject it's ID is 4, and in the body the number is 8. 

Thanks a lot for your time!

Hm,

You could always give a try to reset the orders by removing the order data through phpmyadmin. For that, always make a backup of your database first, and then truncate the lc_orders, lc_orders_comments, lc_orders_items and lc_orders_totals. I believe the count should start with 1 again after that. 

I remember doing this a while ago, tried to find my notes but can't find them anymore. So I'm only 90% sure, but you can't go wrong if you make a backup first :)

تم إغلاق هذا الموضوع بسبب عدم النشاط لفترة طويلة، ولا يمكن إرسال المشاركات إليه.
عرض الكود على GitHub