chrometweaks.org

What's a cheap and reliable website iPage hosting service registered with ICANN?

Click Here To View All Answers...


First question I have is What's a cheap and reliable website iPage hosting service registered with ICANN? Thanks in advance for any answer. Second question of mine... I am trying to include a new field in the "Configuration" section in the Admin. Actually, I did it already. Problem is, it isn't being recognised by the scripts the way the others are. "STORE_NAME", "STORE_/img/avatar9.jpg" types of entries are easily called from the scripts and I need this functionality.



Any answers? Thanks, Craig...

Comments (158)

Good question... I dunno what is the answer to that question. I'll do some Googling and get back to you if I discover an useful answer. You should email the people at iPage as they probably could give you an answer..

Comment #1

Application_top is required just like in every other script, so I guess I need to check the cfg ID or something. I am trying to add a cfg value that would make it easy to send additional copies of the "vendor_emails" that I am finishing up. Is there a specific ID range or value needed for app_top to find these keys in the db maybe? I will look more closely in app_top. Any suggestions? I could call to the db directly and check for additional addresses but it would be easier with this simple call. Thanks for the quick response..

Craig..

Comment #2

I've used all the way up to 998 as the ID so that's not related AFAIK. Take note that if you are trying to call the configuration value from within a function, you may need to remove possible restrictions from the function..

For example ....

A function that contains a restriction that the 2nd value must be an integer, would not accept this:.

Function ($string, CFG_KEY).

Even though the CFG_KEY value might be an integer. Removing the restriction from the fucntion would then allow the above usage...

Comment #3

This key would return an e-mail address or addresses just like SEND_EXTRA_ORDER_EMAILS_TO. In fact, I thought I could essentially copy that and simply rename it to fit my needs. That is not working so I guess I will just do a query. Thanks again Acheron, very helpful...

Comment #4

Here you go:.

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (300, 'Extra Vendor Emails', 'XTRA_VENDMAILS', '', 'Extra vendor email addresses', 12, 6, '2004-06-24 19:49:44', '2004-06-24 19:49:44', NULL, NULL);.

This would put it in Email options (seemed as good a place as any).

Usage would be:.

<?php echo XTRA_VENDMAILS; ?>.

Or if appending to other variables ....

<?php echo $emailsXTRA_VENDMAILS; ?>.

If you want to pull from a DB table, gimme a sec and I can lay that out I think..

This post has been edited by.

Acheron.

: 01 July 2004, 05:12..

Comment #5

Thanks for the efforts but I just tested it and I get the same result. A parse error. The only way I can get ridd of the error is to change the reference to something I know the scripts recognize. Got me. If you have any other suggestions I am open. And, seriously, thanks, for trying...

Comment #6

Paste the echo you're using. If the value wasn't being recognized you would simply get nothing. Parse error means there's an error elsewhere. No worries, paste it and we'll sort it...

Comment #7

Here it is..

// send copies.

If (XTRA_VENDMAILS != '') {.

Tep_mail('', XTRA_VENDMAILS, 'Customer Order #', $vendor_details, $email, $email_message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);.

Return true;.

}.

}.

This gives me a parse error..

This does not:.

// send copies.

If (SEND_EXTRA_ORDER_EMAILS_TO != '') {.

Tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 'Customer Order #', $vendor_details, $email, $email_message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);.

Return true;.

}.

}.

Note, the key is the only thing that changes and the error goes away. I don't get it. What do you think?..

Comment #8

Well the function in admin looks like this:.

Function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {.

If (SEND_EMAILS != 'true') return false;.

So try something like:.

Tep_mail('', XTRA_VENDMAILS, 'Customer Order #', $vendor_details, $email, $email_message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);.

Or even.

Tep_mail(XTRA_VENDMAILS, XTRA_VENDMAILS, 'Customer Order #', $vendor_details, $email, $email_message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);.

(b/c otherwise the to_name is blank isn't it?).

Hehe wait a sec, noticed you have too many values there for the admin side..

This post has been edited by.

Acheron.

: 01 July 2004, 05:56..

Comment #9

Would have to be something like:.

Tep_mail(XTRA_VENDMAILS, XTRA_VENDMAILS, $vendor_details, $email_message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);..

Comment #10

Yes it would be blank. No change. Pretty wierd huh?.

The parse error first references the line whith the "if" staement. And after changing the key in the "if" statement first, then, the error references the tep_mail line. Change the key and the error goes away. Is it possible that the db calls I am making prior to the mail part are somehow confusing the scripts. Doesn't seem possible. App_top collects and organizes all the cfg keys on it's own.

HMMMMMM!..

Comment #11

Kill the if statement and see what happens. Also cut those values down to 6 as the code you posted contained 8 and.

Should.

Error out...

Comment #12

Which values? No difference without the if statement. Do you mean the number of included values included in the mail?..

Comment #13

OK, let's make it a little fancier. hehe This will work..

Run this SQL:.

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (301, 'Send Extra Vendor Mails', 'XTRA_VENDSEND', 'True', 'Do you want to send extra vendor emails', 12, 7, '2004-06-24 19:49:44', '2004-06-24 19:49:44', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');.

Then find in admin/orders.php:.

//send the email.

Tep_mail($the_name, $the_email, 'Customer order', $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);.

}.

Change to:.

//send the email.

Tep_mail($the_name, $the_email, 'Customer order', $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);.

}.

If (XTRA_VENDSEND == 'True') {.

Tep_mail('', XTRA_VENDMAILS, 'Customer order', $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);.

}.

Make sure you only have 1 email addy in XTRA_VENDMAILS If it requires a value in that first field, just put anything in there for testing. i.e. STORE_OWNER w/o the ''.

This post has been edited by.

Acheron.

: 01 July 2004, 06:33..

Comment #14

For some reason my iPage site has decided that it does not like the idea of making new cfg keys. What a @$%@$$$^ this is! I think I am going to sleep on it and maybe fresh eyes can see the answers. If you have any other thoughts on this please post them. You are at least educating me quite a bit. Thanks for the extra help Acheron, the community will also be thanking you after I get these updates finished, it will be much better that my first release. Craig..

Comment #15

I am trying to include a new field in the "Configuration" section in the Admin. Actually, I did it already. Problem is, it isn't being recognised by the scripts the way the others are. "STORE_NAME", "STORE_OWNER" types of entries are easily called from the scripts and I need this functionality. I am assuming that these are defined somewhere but I can't figure out where..

Any answers? Thanks, Craig...

Comment #16

The configuration_key (i.e. STORE_NAME) is what the files use. They are called in application_top so as long as a file uses that, it will call it. What exactly are you trying to do?..

Comment #17


This question was taken from a support group/message board and re-posted here so others can learn from it.