Question

I have magento commerce, and I am creating in html an automatic e-mail that is going to be sent when someone signs up (in Dreamweaver).

In the HTML code I have a button that is about subscribing in our newsletter. What is the code that I have to link to this image, so if someone clicks on it he will subscribe to the newsletter.

Thanks in advance, Frank

Was it helpful?

Solution

The call goes to:

http://yourdomain.de/index.php/newsletter/subscriber/new/  

But form data is sent via post as you can see in the Mage_Newsletter_SubscriberController newAction, where you find the following line of code.

  $this->getRequest()->isPost() && $this->getRequest()->getPost('email')

So you need to name your form field 'email'

Good luck!

Edit:

Just use something like this:

<form action="http://yourdomain.com/index.php/newsletter/subscriber/new/" method="POST" id="newsletter-validate-detail">
<input type="text" class="input-text required-entry validate-email" name="email" id="newsletter">
<input type="image" src="path to image" name="submit" />
</form>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top