If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Need urgent help- to inc order atrib in email subject line

Need urgent help- to inc order atrib in email subject line

Locked

Started by oavs on 12 Sep 2008, 12:33 AM · Views: 4,079

Results 21 to 40 of 49
This thread is locked. New replies are disabled.
23 Sep 2008, 2:49 AM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Need urgent help- to inc order atrib in email subject line

On the Attribute, when you created it, what was the Option Type set on the Options Name? Was it TEXT?

Okay, now go place an Order for this Product ...

Then, go to phpMyAdmin and browse the orders_products_attributes table ...

What are the options_id and options_values_id that you see on this Order number?

Is the options_value_id a 0?

If so, you are using the value:
products_options_values_id = 3

and it is a 0 ... and if this is the case, that IF will never trip and it will never be set to add to the subject ...

Is the options_values_id a 1 or a 2? If it is the 2, you are using in the IF statement a:
products_options_id = 1

If it is the 2 and you have the 1, then the IF will never trip and it will never be set to add to the subject ...

And if that is the case, you need to change your IF statement to use the right values ...

On your Product, what does the text of the Option Name read?
Your image file for upload:
-- or --
Your Photo

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2008, 3:00 AM
#22
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

Attributes Controller as is now for the product ID# 2 Red - Red Roses -

ID | Option Name | Option Value
3 | Your Photo | TEXT
2 | Your image file for upload:| TEXT

phpMyAdmin options_id and options_values_id that
options_id =2
options_values_id=0

so I will now enter the correct option ID and value ID in the code you've sent me to see if it will work ..crossing my fingers..

Downunder QLD

23 Sep 2008, 3:42 AM
#23
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need urgent help- to inc order atrib in email subject line

Let's see if that IF works better with the right values ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2008, 3:50 AM
#24
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

Ok it did not work. I am still disillusioned with the idea that if I am placing your code in the correct section within /includes/classes/order.php

well its a bout time you see my order.php.

Code inserted at the top and at the very bottom with comments. I have zipped the order.php (have no idea where it got uploaded??)

Downunder QLD

23 Sep 2008, 4:10 AM
#25
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need urgent help- to inc order atrib in email subject line

Sorta ... not quite ...

All of that code needed to be together right where the old line for the zen_mail was ...

You had the IF at the top of the file and added what it created, which was nothing, to the subject ... :eek:

See if this works better for you ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2008, 4:15 AM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need urgent help- to inc order atrib in email subject line

:oops:

2 other changes ...

You have the field names spelled wrong ... :blink:

The need to match what is in the table on the end ...
products_options_id
products_options_values_id

not what you have:
products_options
products_options_values

The IDs are the numbers and without is the text value of the IDs ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2008, 4:43 AM
#27
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

Ok zip code did not worked either. But now seen your last comment, is that mean I need to change .

(The need to match what is in the table on the end ...)
they are in adminphp as below.
products_options_id = 2
products_options_values_id = 0

In adminphp

$check_attributes = $db->Execute("SELECT products_options, products_options_values from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where products_options_id = 2 and products_options_values_id = 0");
if ($check_attributes->RecordCount() > 0) {
$add_subject = ' ' . 'Note Text Here';

If change the values say products_options_id = 2 and products_options_values_id = 0 I get in adminphp field 'products_options_values' ABC-123XX-90 which what I have entered but it does not appear in the email subject line

On the other hand

If change the values say products_options_id = 1 and products_options_values_id = 0 I get in adminphp field 'products_options_values' 3. BACK.gif which is what is uploaded image but it does not appear in the email subject line

Have no idea if I am doing something wrong

Downunder QLD

23 Sep 2008, 4:46 AM
#28
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

And here is the table

INSERT INTO zen_orders_products_attributes (orders_products_attributes_id, orders_id, orders_products_id, products_options, products_options_values, options_values_price, price_prefix, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_discounted, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, products_options_id, products_options_values_id, products_prid) VALUES
(9, 9, 9, 'Your image file for upload:', 'ABC-123XX-90', '0.0000', '+', 1, 0, '+', 1, 1, '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '', '', '0.0000', 0, '0.0000', 0, 2, 0, '2:202c18d96f486f9efbbbf5b6bf393872'),
(10, 10, 10, 'Your image file for upload:', 'ABC-123XX-90', '0.0000', '+', 1, 0, '+', 1, 1, '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '', '', '0.0000', 0, '0.0000', 0, 2, 0, '2:202c18d96f486f9efbbbf5b6bf393872'),
(11, 11, 11, 'Your Photo', '3. BACK.gif', '0.0000', '+', 1, 0, '+', 1, 1, '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '', '', '0.0000', 0, '0.0000', 0, 1, 0, '2:82b19dd9c56f2ca6eb29af3eb81bf310');

Downunder QLD

23 Sep 2008, 5:21 AM
#29
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

And also I am not getting any emails as a 'customer' since I am the admin and the customer (with different name and email) . Does that give you more clues? As admin I am getting emails but subject line only says Subject: 'Order Confirmation No: 13'

Downunder QLD

23 Sep 2008, 5:27 AM
#30
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

I am lost..totally lost now.

my email header says ([email protected] is my admin email and the [email protected] is the 'customer John Doe' I have created.

-----Original Message-----
From: abc.com.au [mailto:[email protected]]
Sent: Tuesday, 23 September 2008 3:19 PM
To: [email protected]
Subject: Order Confirmation No: 13

Order Confirmation from oavs.com.au

John Doe

Downunder QLD

23 Sep 2008, 5:35 AM
#31
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

May be it is working but I am not getting my admin email may thats why I can not see it? but then again why did my admin emails not working?

Downunder QLD

23 Sep 2008, 5:46 AM
#32
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

Halt everything. Its sort of working.

here is what I have found.

When I created my zencart through cpanel, it basically took my host name as my email address even though I had put the correct email (I think) . Any way after checking in admin > emails I could see that emails were incorrect. So I have changed them and they work now.

Ajeh only thing is now when I receive the email , on the subject line it says 'Subject: [NEW ORDER] Order Confirmation Note Text Here No: 16'

How can we get the field value appearing instead of the ' Note Text Here'

Downunder QLD

23 Sep 2008, 5:53 AM
#33
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need urgent help- to inc order atrib in email subject line

When you say field value, do you mean what you see in the orders_products_attributes table in the options_id field?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2008, 6:03 AM
#34
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

I know you are going to kill me but is it possible to put the certain 'Note Text' depending on the which of the two products_options_id = 2 or products_options_values_id = 0 used.

and

put the certain 'Note Text' depending on the which of the two products_options_id = 2 or products_options_values_id = 0 used.

I mean, if products_options_id = 2 used then is it possible to have the subject line to say (where 'Note Text Here') 'Image Reference Number:
' which is the option name used (not its value) BTW I did not create any option values in the attributes for the option names because values are entered. does that make sense or correct??

If you look at the URL you will see only two options http://oavs.com.au/store/index.php?main_page=product_info&cPath=2&products_id=2

Downunder QLD

23 Sep 2008, 6:07 AM
#35
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

OK, I am getting confused again

All I need once you had a look the site , there are two fields.
Their names appear as
Your Photo:
Image Reference Number:

So if they use 'Image Reference Number:' field entry I want subject line of the email to say 'Image Reference Number'
on the other hand if they used Your Photo field entry I want subject line of the email to say 'Your Photo'

That's it I finally expressed my self !! :-)

Downunder QLD

23 Sep 2008, 6:10 AM
#36
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

BTW at the moment regardless which field has been used I am getting the same subject line
[NEW ORDER] Order Confirmation Note Text Here No: 18

Downunder QLD

23 Sep 2008, 6:14 AM
#37
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

Ajeh:

When you say field value, do you mean what you see in the orders_products_attributes table in the options_id field?

No I meant 'products_options '

So the subject line would show 'products_options ' value (what ever is recorded in the phpadmin table after the order has been submitted . The wording would be either
'Image Reference Number' OR 'Your Photo'

Downunder QLD

23 Sep 2008, 6:17 AM
#38
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need urgent help- to inc order atrib in email subject line

You have two Option Name and Option Values ...

The first set is using:
Your Photo
products_options_id = 1
products_options_values_id = 0

Image Reference Number:
products_options_id = 3
products_options_values_id = 0

I could of sworn that was a 2 rather than a 3 earlier ... :unsure:

What do you want to see when it is the:
Your Photo
products_options_id = 1
products_options_values_id = 0

What do you want to see when it is the:
Image Reference Number:
products_options_id = 3
products_options_values_id = 0

If you just need the Option Name text themselves on each of these, then you need an extra check on these ...

From what you are saying, an order will only have 1 Product with either of these and never will there be 2 of these Products in the same order with different information, correct?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2008, 6:23 AM
#39
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Need urgent help- to inc order atrib in email subject line

I could of sworn that was a 2 rather than a 3 earlier ... .. and you are correct. I changes the name to make sense therefore it changed to 3 ..sorryy

What do you want to see when it is the: I want to see in the subject line 'Your Photo'
Your Photo
products_options_id = 1
products_options_values_id = 0

What do you want to see when it is the: I want to see in the subject line 'Image Reference Number'
Image Reference Number:
products_options_id = 3
products_options_values_id = 0

and the simple reason is when we get 1000's of orders, by just looking at the subject line we will be able to sort it qyuickly

Downunder QLD

23 Sep 2008, 6:28 AM
#40
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need urgent help- to inc order atrib in email subject line

I sure hope your remember us fondly after we get this working ... :lamo:

Give me a few minutes to write the changes ... have a smoke ... perhaps a drink ... kick the dog ... er ... umm ... skip the kick the dog ...

Be about 10 or 15 minutes ... :flex:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!