0

I'm using Magento 1.9.1.0

I have two types of Newsletter Subscription. One is the default, wherein after a user subscribes, the page will reload and the message will be displayed at the top. Another one is AJAX in a Modal, wherein after subscribing, the page won't reload but the message will not appear. It does subscribe the user because I can see it on Newsletter -> Newsletter Subscribers at the admin panel.

I want it to appear inside the modal without refreshing the page, and it won't appear again at the top like the default ones when a user refreshes the page.

Is this possible? Thank you!

1 Answer 1

0

I managed to make it work by manually adding the message directly on a hidden <div> that gets displayed/showed when the Ajax submit is successful. That <div> is just below the <form>'s end tag.

This is the code for the message:

<div class="form-success" id="successForm">
  <ul class="messages">
    <li class="success-msg">
      <ul>
        <li>Thank you for your subscription.</li>
      </ul>
    </li>
  </ul>
</div>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.