Addon code to add customer order number(nth order)

Hi Cs-carters,

One minor addon code from my side.

It adds customer's order number (nth order) on the order detail page.

I use it for fraud checks. If I see that its customer's 1st order I call him and things like that.

Add customer’s order number on Cs-cart admin’s order detail page


Hi … Great idea!

Does this work with cs-cart 2.2?

Hi … very nice idea!

I work with cs-cart 2.2.5

tank you…

maybe near write total order cost (but I dont know how)

Thanks for the appreciation. Sadly, I have lost touch with 2.x long time back :(

Hi. I installed and it was very easy but I get strange results. Some customer orders are showing correct:

Customer's order # 5 (And I verify there are 5 orders from the customer)

Customer's order # 1 (And I verify there are 1 orders from the customer)

but then I see on other customers:

Customer's order # 2205 (And I verified this is their first order),

and another:

Customer's order # 2301 (And I verified this is their first order too),

Sampled customers with previous canceled orders, backorders, completed, incomplete, processing, etc and cannot see a pattern of why some orders are showing the correct amount and others showing a way too high/incorrect amount of orders #.

Is there something in this line not fully compatible with cs cart 2.2?

$sql = "SELECT count(*) as count FROM ?:orders WHERE user_id = ?i AND order_id <= ?i AND is_parent_order != 'Y' AND STATUS != 'I' " ;

Thanks!! I would like to have this working for exactly the reason you said in knowing if I can fully trust the order or need to check further if the order is more risky.

[quote name=‘shikhar’ timestamp=‘1370181704’ post=‘162903’]

Thanks for the appreciation. Sadly, I have lost touch with 2.x long time back :(


Okay no problem I will see if I can figure out why is it is not calculating right in my 2.2.

I like your website showing the links to all the different cs cart addons too! I did not know your site was out there ( Very helpful!!