Jump to content

send parameter to contact page


denny8x

Recommended Posts

Hi I would like to know if is there a way to send parameters to contact page, what I need to do is to add a button on product page linked with contact page, on clicking this button contact page should be opened with some information about product (ex. product name) already written  in the messagge text. Button is not a problem but I have no idea about how to send a product refer from product page (or product list) to contact page using the button.

PS vers. 1.6.1.9

 

Best Regards

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

I suggest changing line 144 of themes/default-bootstrap/contact-form.tpl from:

<textarea class="form-control" id="message" name="message">{if isset($message)}{$message|escape:'html':'UTF-8'|stripslashes}{/if}</textarea>

to:

<textarea class="form-control" id="message" name="message">{if isset($message) && $message}{$message|escape:'html':'UTF-8'|stripslashes}{elseif isset($smarty.get.product)}{l s='Product name:'} {$smarty.get.product}{/if}</textarea>

You can then add something like ?product=Test after the contact form link to automatically fill in the product name in the message.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...