Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Request Product Info


Jack_mcs

Recommended Posts

Then i will say that you broke some of the template code when you installed this addon. Templates modify the normal way of how oscommerce is working and that you have to adapt into addons when installing it. That means reading and understanding the code and merge the changes needed by this addon into your own modifyed template files.

Link to comment
Share on other sites

  • Replies 84
  • Created
  • Last Reply

Top Posters In This Topic

Hi all!

 

just installed R.P.I. v1.2 in osC 2.2rc2a with Ultimate Seo Urls 5r141.

 

When I click on "request information" button and try to load "request-product-info.php" page, I get the error message:

 

"Error!

Unable to determine the page link!"

 

and also alert from USU5:

"USU5 could not find a valid base filename, please inform the developer."

 

which comes from the following in application_top.php line 68:

 

   // Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php
   if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) || ( $_SERVER['PHP_SELF'] == '/' ) ) {
     return 'index.php';
   } 
   trigger_error( 'USU5 could not find a valid base filename, please inform the developer.', E_USER_WARNING );

 

This is due to the fact that the character "-" is used by USU5 as word separator and the filename "request-product-info" may cause conflicts.

Just rename "request-product-info.php" to "request_product_info.php" or ""requestproductinfo.php"" or whatelse without "-", and everything works fine! :)

You also need to update filenames.php file, so:

 

1) In "catalog/", Change file name "request_product_info.php" to "requestproductinfo.php";

 

2) In "catalog/includes/languages/english/", Change file name "request_product_info.php" to "requestproductinfo.php";

 

3) Change the following to includes/filenames.php:

Change:

define('FILENAME_REQUEST_PRODUCT_INFO', 'request-product-info.php');

To:

define('FILENAME_REQUEST_PRODUCT_INFO', 'requestproductinfo.php');

 

Hope it works for you too.

Happy code! :thumbsup:

Link to comment
Share on other sites

  • 1 month later...

Just trying to include the senders IP adress in the sendt email, any suggestion on the best way?

A quick and easy way is the following, not tested, way. In request-product-info.php, find

$comment = tep_db_prepare_input($HTTP_POST_VARS['comments']);

and change it to

$comment = tep_db_prepare_input($HTTP_POST_VARS['comments']);
$comment .= "\n\n" . 'IP Address is ' . $REMOTE_ADDR;

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks,

 

I found a way around it to and it is multilanguage to. If it is the best way or should be altered i am not sure.

 

In the languagfile request-product-info.php i added/altered the 'Sender IP: %s'

 

define('EMAIL_MESSAGE', '%s har spurt etter informasjon om følgende produkt(er):' . "\n" . '%s' . "\n\n" .
'Her er kontaktinformasjonen for %s' . "\n\n" .
'Tlf: %s' . "\n" .  
'E-Post Adresse: %s' . "\n" . 
'Adresse: %s' . "\n\n" .
'Kommentarer: %s' . "\n\n" .
'Sender IP: %s' 

);

 

 

and in the main file request-product-info.php appended the $_SERVER['REMOTE_ADDR'] to msg string.

 

         $product_info = tep_db_fetch_array($product_info_query);    
        $products .= $product_info['products_id'] . "\t" . $product_info['products_name'] . "\n";
     } 
     $msg = sprintf(EMAIL_MESSAGE, $name, $products, $name, $phone, $email_address, $home, $comment, $_SERVER['REMOTE_ADDR']);
     tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $msg, $name, $email_address);

Link to comment
Share on other sites

  • 3 months later...

Hello

 

I installed the Version 1.2 on an Oscommerce v2.2 RC2

 

I got now the problem that when a customer whant's to send the enquirie he gets a error about his emailadress. The error cause allway even with a correct emailaddress. There musst be some thing wrong with the validation. Has any body idea how to solve this?

Link to comment
Share on other sites

I installed the Version 1.2 on an Oscommerce v2.2 RC2

 

I got now the problem that when a customer whant's to send the enquirie he gets a error about his emailadress. The error cause allway even with a correct emailaddress. There musst be some thing wrong with the validation. Has any body idea how to solve this?

I don't support anyone else's code so I can't help with that version. You can try contacting the person that uploaded the version you are using or install my last version.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I don't support anyone else's code so I can't help with that version. You can try contacting the person that uploaded the version you are using or install my last version.

 

Hello Jack

I installed now your Version 1.1, every thing works fine. thanks for this great contibution.

 

cheers Pat

Link to comment
Share on other sites

  • 4 years later...

Hi everyone,

 

first of all i want to say that i have very limited knowledge of php language. My boss asked me to install a captcha on our OScommerce website to prevent us from receiving all sorts of spam and junk mails. Everything worked perfectly until i tried to install it on the request product info add-on. I'm pretty sure i can adapt the code from the captcha i have choosen but like i said i have limited knowledge in php. Could anyone help me with that problem ?

 

The captcah i'm using is this one:

Captcha (reCAPTCHA) for Contact Us, Login and Create Account pages

 

Thank you very much.

 

David

Dave, this conversation can serve no purpose anymore. Goodbye.

- HAL

 

 

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...