How do I make order number show in customer email as plain text and not a link?

This was posted for version 6 here But doesn't work with version 7.3.

Changing $order_link to $order_id doesn't work.



longwave’s picture

Status: Active » Fixed

You have to use the somewhat unintuitive $order_order_id:

print $order_order_id;

superdorx’s picture

That didn't work. I received the following error:

Notice: Use of undefined constant order_order_id - assumed 'order_order_id' in include() (line 153 of /home/growhairproducts/public_html/themes/bartik/templates/uc-order--customer.tpl.php).

And the result in the email is Order #: order_order_id.

longwave’s picture

Are you sure you typed that correctly? It works for me, and the "undefined constant" error would only appear if you missed off the $ sign.

DanZ’s picture

Hello, fellow Dan!

I did this exact thing for the printed invoice, because it's dumb to have a link in something printed. Lemme dig up that code...


Where did I put that thing...?

(...distant metallic clanging...lid-slamming...something small and made of glass shattering...)

Ah, here it is!

print $op == 'print' ? $order_order_id : $order_link;

So, there you go. It's $order_order_id.

You probably know the stuff there already, but if you're monkeying with the invoice template, you might want to look at

superdorx’s picture

A simple flush of the cache resolve it. Works like a charm.

Thanks longwave! Appreciate it dude.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.