Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution - My First] Request Feedback, Automated


Recommended Posts

I've been running this mod on php v4.3.1 for a number of weeks with no problems. It works great.

 

maybe the problem has to do with the php config rather than php v4.3.1 in general??

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

  • Replies 84
  • Created
  • Last Reply

Top Posters In This Topic

Oh, I guess that could be. I though you had problems with it too.

 

Well, I know that have been at least 3 reported cases (including myself) where this script keeps runnign and running, using all of the system resources until the process is killed.

 

I suppose it could be the configuration of php.

 

I guess I just want people to be aware that there could be a problem.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

got it working now but had to hardcode the URL DIR_FS_CATALOG from:

 

The deal with that is that my 'DIR_FS_CATALOG ' has a forward slash at the end of it, so when I developed this, I didn't put a forward slash between the "DIR_FS_CATALOG" and the filenames.

 

If you dod not have a forward slash at the end of those defines, then yours should read

 

$datafile= DIR_FS_CATALOG . '/feedback_data.txt';

$historyfile= DIR_FS_CATALOG . '/request_history.txt';

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

it looks like that the defined variable and fopen do not work properly together anymore in php 4.3.x but that's my opinion, when you hardcode it, then there are no probs.

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

I can't get this to work with the cron job. I can go into my browser and type mydomain.com/feedback_request.php and it executes, sends out the email and all is fine. Which file is the cron for?

Keith

 

 

What the hell was I thinkin'?

Link to comment
Share on other sites

  • 4 weeks later...

WW,

 

i just wanted to see if you have this mod of your running? If so, can you re-contrib it for us?!!

 

Thanks pal

 

 

got it working now but had to hardcode the URL DIR_FS_CATALOG from:  

 

The deal with that is that my 'DIR_FS_CATALOG ' has a forward slash at the end of it, so when I developed this, I didn't put a forward slash between the "DIR_FS_CATALOG" and the filenames.

 

If you dod not have a forward slash at the end of those defines, then yours should read

 

$datafile= DIR_FS_CATALOG . '/feedback_data.txt';

$historyfile= DIR_FS_CATALOG . '/request_history.txt';

Link to comment
Share on other sites

Yes, I finally got this working.

 

The problem I was having is that the fwrite function does not automatically create a file if the specified file does not exist. And this script has a history file that keeps track of all the custoemrs it has emailed. So when it tries to write the that history file, and the files doesn't exist, it just hangs.

 

Anyway, I can fix the directions to include the creation of the history file, and that should fix the problem.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

WW,

Do you have an update (one that works on PHP 4.3.1 + ) to this contribution?

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

Actually, the original contribution still works, you just have to make sure that you manually create all of the files this program needs, including hte history file, which the installation instructions neglect.

 

Otherwise, the contribution works with php4.3.xx just fine.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

I can't get this working, I've made all the tricks, made a cron job entry, feedback_data.txt, request_history.txt and feedback_request.php are in catalog folder, feedback_tester is working ok.

 

I made new account, but all email that comes is that kind:

Those _SERVER settings are ok, but I replaced them with this: ????, you know why :lol:

 

PHP: Error parsing /etc/browscap.ini on line 6801

X-Powered-By: PHP/4.1.2

Content-type: text/html

 

 

<?

define('HTTP_SERVER', '????');

 

define('DIR_FS_LOGS', '?????');

 

define('ENABLE_SSL', 0);

// define our database connection

define('DB_SERVER', '?????????');

define('DB_SERVER_USERNAME', '??????');

define('DB_SERVER_PASSWORD', '?????');

define('DB_DATABASE', '?????');

define('CONFIGURE_STATUS_COMPLETED', 1);

define('USE_PCONNECT', 'true');

define('STORE_SESSIONS', '');

?>

Unable to connect to database server!

 

and this email comes to shop owner email address, not to this new account address...

 

Any ideas ?

Sammy 1001

Link to comment
Share on other sites

Sorry, I don't understand what you mena by...

 

I made new account, but all email that comes is that kind:

 

Or this...

 

and this email comes to shop owner email address, not to this new account address...

 

Are you saying that when someone signs up for an account, but does not order anything, that the store owner gets an email?

 

If this is the case, open your feedback_data.txt and make sure that the script is writing to it properly. if it is still empty, then it is not writing to it properly, and if the file is empty, then the store owner will always receive the email, assuming that this is still in test mode.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

So I signed up for an account and did not ordered anything, but I don?t get any feedback messages...

 

There is control panel in our hosting provider where we can make this cron entry and there we can also put an email address and that error message comes to that email address...

 

Script is not writing anything to feedback_data.txt but it writes to request_history: "Emailing [email protected]"

 

But when I try feedback_tester.php, it writes to feedback_data.txt and there is 1249 right now and last customer_id is 1250...

Sammy 1001

Link to comment
Share on other sites

OK, now I'm really confused.

 

Are you now saying that you don't get any email, to the shop owner or otherwise?

 

If the tester is writing to the history file, and you see the message, "Emailing [email protected]", then that is exactly what it did. It sent an email to the address "[email protected]"

 

If you did not receive it, then htere might be an issue with your email.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

I don?t get any feedback message as a new customer (I signed up for an test account), email address is correct, but error message comes to shop owner or shop admin or whatever email address we set in control panel with cron entry,

 

we have this kind of control panel where we put cron jobs:

Mail-To: (in this field we put shop admin or whatever email address, and

that error message comes to this address)

and there is of course these cron entry fields:

Minute, Hour, Day of month, Month, Day of week, Command

 

Maybe there is something wrong with our hosting system or I did something wrong or whatever I don't know anymore :?

Sammy 1001

Link to comment
Share on other sites

Sammy, you are just not giving me all the facts here.

 

What error message are you talking about?

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Ok, I think I'm beginning to piece this together.

 

Your cron job that you have set up, is set up to email you if it encounters errors? Correct?

 

And the email you received was in your first post, correct?

 

Well, it looks to me that your host doesn't allow you to connet to your MySQL database with a script that is called from CRON. You should ask them about that.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Your cron job that you have set up, is set up to email you if it encounters errors? Correct?

Yes.

 

And the email you received was in your first post, correct?

Yes.

 

Well, it looks to me that your host doesn't allow you to connet to your MySQL database with a script that is called from CRON. You should ask them about that.

 

Ok, I'll ask them about that, thank you !

Sammy 1001

Link to comment
Share on other sites

My pleasure Sammy. Sorry I couldn't help more.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

  • 1 month later...

This is a great contribution, thanks for doing such a great job. I have a problem that I hoped you could help me solve. When the script is run from cron it gives me an error that "includes/application_top.php" could not be included (that is the relative path to the file). So, I figured it needed an absolute path so I made my includes as follows:

 

$_SERVER['DOCUMENT_ROOT'] = '/home/xxxxxx/public_html/';

$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];

require($DOCUMENT_ROOT . 'includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT_PROCESS);

 

The code above will include the file, though it errors on application_top.php includes files. For instance, it says

 

Warning: main(includes/configure.php): failed to open stream: No such file or directory in /home/xxxxxx/public_html/includes/application_top.php on line 32

 

 

I am not a PHP programmer but I know in perl there is a variable that if set will be used to include files when you give incomplete paths. I was thinking that $DOCUMENT_ROOT was similar and that is why I tried to simulate a web server request by setting those variables the way I did. Does anyone know how to fix this and/or what the real problem is?

 

 

Thanks, as always![/code]

Link to comment
Share on other sites

I haven't read through 7 pages of topics yet but have you thought about instead of doing the email through cron .. to just do a popup .. that happened to me the other day at a site and it wasn't that intrusive. especially if you couch it like you are taking an exit survey to improve your shop and one of the 4 questions is did you have any problems with the store .. this way you have a possiblity of getting 4 distinct answers that might help you with your presentation. You can also ask at that time if your customer would like to be emailed the newsletters if they didn't sign up etc .. lots of paths to choose from which one is the least traveled

(my knowledge is so small you would think that an ant was a genius in comparison)

Link to comment
Share on other sites

Well, the documnet root variable should be defined in your /includes/configure.php file.

 

The biggest problem that people have with this mod is making sure that all of the files it uses exist in the directory that we define them. I guess because the variables I used for the document root and web root, which it seems everyone has defined differently.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Hi Chris, did you make an update to this module to work with os 2.2ms2

 

I was trying to follow the steps but I'm not shure everthing is correct:

STEP 2.)

-------

Copy 'feedback_data.php' to your document root. (Example: /home/username/feedback_data.php)

 

There is no "feedback_data.php" file in the contribuition, there is "feedback_data.txt" was it a typo or I'm missing a file.

 

Second, STEP 4.) is asking me to modify this file, it doesn't exist in ver. 2.2ms2

-------

Open '/catalog/includes/languages/english/create_account_process.php'

 

Regards,

Joseph

#Joseph

Link to comment
Share on other sites

No, it's not updated for 2.2.

 

I'm not currently working on 2.2, so I'm not sure I'll be upgrading it soon.

 

I just DL'ed the zip though, and the feedback_request.php is included.

 

The defines that I have in the english file can be moved to english.php or whereever, as long as you include that file at the beginning of the feedback_request.php script.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Sorry, I mean it is not updated for MS2.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

  • 3 weeks later...

Hi All :!:

 

Just to let you know, I've got this contrib (the lastest verion - v1.2b) to work, fine.

 

I must admit I did have a strugle. But reading the instructions again, again, and again, plus, visiting this post I finally got it to work.

 

It's a very neat and polite way to ask the customer for some feedback, which I think is nice, but not in a spamming way. Just debating using the Cron setup in Cpanel? As when I tested out the contrib first time it emailed my test account straight away, so maybe this is good enough?

 

Anyway, it's very easy to get working, well, when you know how to. :D

 

Neil. :wink:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...