Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Managing Customers and Orders / Can I add a unique number to the beginning of theEmail Subject - Contact Us

Can I add a unique number to the beginning of theEmail Subject - Contact Us

28 May 2013, 12:45 AM
#1
jetx avatar

jetx

Zen Follower

Join Date:
Apr 2006
Posts:
425
Plugin Contributions:
0

Post #1 by jetx

I would like a unique number to be placed in the email subject field, placing it before the 'Website Inquiry from '... define('EMAIL_SUBJECT', 'Website Inquiry from ' . STORE_NAME);

So, for example, the received email subject would be something like: 3299 Website Inquiry from myStore

Any ideas as to how to achieve this? Thanks.

28 May 2013, 12:52 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

One would need to add a table or a record to an existing table as a counter
Then add code to lookup this table/value and increment it by "1" and include it - code it into the contact us file

Most likely as part of the "submit" action so that customers just navigating to this page do not add to the count

Zen-Venom Get Bitten

28 May 2013, 1:42 AM
#3
jetx avatar

jetx

Zen Follower

Join Date:
Apr 2006
Posts:
425
Plugin Contributions:
0

Post #3 by jetx

I see. Well the purpose of this is quite simple, it is to prevent emails being grouped within the same thread by subject and easier to fwd to sales reps without editing the subject, so anything unique within the subject field would work.

What about the using Date and Time, eg Mon May 27 2013 16:54:20 EST. Can you advise how I might use OFFICE_DATE_TIME as part of my email subject?

28 May 2013, 1:47 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

Just add your desired prefix into the define. You can use straight text, or dynamic such as the current date.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 May 2013, 2:43 AM
#5
jetx avatar

jetx

Zen Follower

Join Date:
Apr 2006
Posts:
425
Plugin Contributions:
0

Post #5 by jetx

Thanks, piece of cake. I used . date("D M j Y G:i:s T")

28 May 2013, 4:11 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

That's probably a lot more "date" than really needed. But yes it'll work.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 May 2013, 4:56 AM
#7
jetx avatar

jetx

Zen Follower

Join Date:
Apr 2006
Posts:
425
Plugin Contributions:
0

Post #7 by jetx

Indeed, I did end up cutting off the :s T portion of that. Unless I get more than one email per minute Google Apps will now threat them as separate emails and not combine them as part of a long thread.