When you submit the newsletter subscription form (subscribe.phtml), the form actions aclls a php file. Does anyone know where it is located?
EDIT: And how can I send the form action to a custom php which does the mail sending bit? for example, I want the form handling to be done by a file called sendmail.php
i'm trying开发者_JS百科 to have something like this - instead if the default action getUrl('newsletter/subscriber/new') ?>">
thanks
Magento is locked into an MVC framework, so replacing the framework code with an arbitrary PHP file is going to be difficult. If you give more details on what you would like to do differently than the core code, we can help you figure out what changes to make.
Thanks, Joe
Shooting from the hip, take a look at this tutorial on how to create a controller. Generally, what you'll be doing here is to create an action that will receive your form post, then execute whatever code you need.
So you'll be defining http://mystore.com/somecontroller/something
by creating MyModule_controllers_Somecontroller
with a method called somethingAction
. With some more detail, I can find you more specific examples.
精彩评论