Jump to content

Contact form mod


Recommended Posts

Hi there,

I have created a mirror of the contact form (repurposing it into a "request a product" form), however I want to either:

A) remove the drop-down menu altogether, and map it to a static "subject" (hidden), or;

B) make a static subject that won't display in the regular Contacts form, and set that to the default (and only) option available


I would prefer (A) but B would also be fine if I have no other choice.

Any thoughts?

Link to comment
Share on other sites

Here is my requestproduct mod. I can't take full credit for this mod. I used a combination of Tomer's send to a friend w/ security key module, contact form w/ captcha, and product question module to refine them into this one. So a bulk of the efforts go out to those developers (apologizes for not knowing the names of the latter two modules).

Anyways, it is a product request form with security key image verification. If the user is logged in it will not ask for their name but will automatically pull it from their account, but if they are not logged in it will ask for their name via a visible name field. I removed the drop down menu from the original contact form, so it now automatically sends to your default shop email (which I believe is the one you declared in Preferences >> Contact >> Shop email) I also created a new mail template (copied from the contact form) that fills in the name, manufacturer, product, and message within the body of the email.

This isn't a module that you install through the BO... you will have to move the files to their appropriate folders (ie. root, theme, or mails folder) of your PS directory.

I've done some brief testing with it, and everything seems to be working (at least to my liking)... do some further testing and let me know how it works for you. Please note I am not a programmer and my abilities to help with any issues that might arise will be limited.

PS. to see the form you will have to direct your shop URL to product-request.php (ie. http://www.mysite.com/product-request.php).

Enjoy!

productrequest.zip

Link to comment
Share on other sites

  • 3 weeks later...

hello

great mod

I have testing it.

some issues :

it don't work with accents

when you type a wrong captcha and you send it, you have blank page, I think it will better to have a warning notice, like "wrong digit or no digit"

well done

Link to comment
Share on other sites

Hi... Thanks for the feedback!

I'm not a programmer so I don't know if I'll be able to solve all those problems, but I will give it a try. I am on vacation till later this week and won't have time to look into it until I get back. But in the meantime what do you mean by "accents"?

I think I might have a solution for the wrong security error/bug, but I'm not sure if I know a way around the accents.

Link to comment
Share on other sites

Hey so regarding the wrong security key issue... I was able to figure this one out fairly quickly.

In product-request.php on line 47 should be changed from:

$error = $this->l('The 5 digit Security Code doesn\'t match.');



TO

$errors[] = Tools::displayError('The 5 digit Security Code doesn\'t match.');



HTH!

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

Here is my requestproduct mod. I can't take full credit for this mod. I used a combination of Tomer's send to a friend w/ security key module, contact form w/ captcha, and product question module to refine them into this one. So a bulk of the efforts go out to those developers (apologizes for not knowing the names of the latter two modules).

 

Anyways, it is a product request form with security key image verification. If the user is logged in it will not ask for their name but will automatically pull it from their account, but if they are not logged in it will ask for their name via a visible name field. I removed the drop down menu from the original contact form, so it now automatically sends to your default shop email (which I believe is the one you declared in Preferences >> Contact >> Shop email) I also created a new mail template (copied from the contact form) that fills in the name, manufacturer, product, and message within the body of the email.

 

This isn't a module that you install through the BO... you will have to move the files to their appropriate folders (ie. root, theme, or mails folder) of your PS directory.

 

I've done some brief testing with it, and everything seems to be working (at least to my liking)... do some further testing and let me know how it works for you. Please note I am not a programmer and my abilities to help with any issues that might arise will be limited.

 

PS. to see the form you will have to direct your shop URL to product-request.php (ie. http://www.mysite.co...uct-request.php).

 

Enjoy!

 

I'm trying to use your code, but the only think I see when I try to access the page is a blank page.

I've already applied the correction on the line 47, as you suggested.

 

Can you help me?

 

The page is this

 

Thanks

Edited by douglascrp (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...