2014-05-16 2 views
0

내 사이트에 두 개의 뉴스 레터를 추가하고 싶습니다. 하나는 상단 메뉴에있을 때 하나는 바닥 글에, 다른 하나는 바닥 글에 있습니다. 내 페이지에 두 개의 뉴스 레터를 추가하려고했지만 문제가 있습니다. 내 사이트에 다른 뉴스 레터를 추가하면 첫 번째 뉴스 레터가 작동하지 않습니다. 문제는 무엇인지 알지 못합니다. 누구든지이 사실을 알고 있다면 나를 도와주세요. 감사합니다. 내가 다른 뉴스 레터를 들어한 페이지에 여러 개의 뉴스 레터를 magento로 추가하는 방법은 무엇입니까?

<div class="row-7-col-1"> 
         <h2><?php echo $this->__('newsletter') ?></h2> 
         <p><?php echo $this->__('Sign up to our newsletter and get exclusive deals you wont find anywhere else straight to your inbox!') ?></p> 
       <form action="<?php echo $this->getFormActionUrl() ?>" method="post" id="newsletter-footer-validate-detail-footer"> 

      <input type="text" name="email" id="newsletter-footer" title="<?php echo $this->__('Sign up for our newsletter') ?>" class="input-text required-entry validate-email" /> 


      <input type="submit" title="<?php echo $this->__('Submit') ?>" class="newsbtn" value="submit"> 
      </form></div> 
    <script type="text/javascript"> 
    //<![CDATA[ 
var newsletterSubscriberFormDetail = new VarienForm('newsletter-footer-validate-detail-footer'); 
    //]]> 
    </script> 
</div> 

\app\design\frontend\default\mytheme\template\newsletter에 subscribe_footer.phtml을 넣어 하나의 뉴스 레터 유효성 검사

답변

0
<div class="block block-subscribe"> 
<form action="<?php echo $this->getFormActionUrl() ?>" method="post" id="newsletter-validate-detail_footer"> 
     <input type="text" name="email" placeholder="Enter email" id="email_footer" class="input-text required-entry validate-email mytxt2" /> 
    <button type="submit" title="<?php echo $this->__('Subscribe') ?>" class="button"><span><span><?php echo $this->__('Subscribe') ?></span></span></button> 
</form> 
<script type="text/javascript"> 
    //<![CDATA[ 
    var newsletterSubscriberFormDetail_footer = new VarienForm('newsletter-validate-detail_footer'); 
    //]]> 
</script> 
작동 왜, 내가 확인하고 말해주십시오 \app\design\frontend\default\mytheme\template\newsletter

<div class="row-7-col-1"> 
         <h2><?php echo $this->__('newsletter') ?></h2> 
         <p><?php echo $this->__('Sign up to our newsletter and get exclusive deals you wont find anywhere else straight to your inbox!') ?></p> 
       <form action="<?php echo $this->getFormActionUrl() ?>" method="post" id="newsletter-validate-detail"> 

      <input type="text" name="email" id="newsletter" class="field required-entry validate-email"/> 


      <input type="submit" title="<?php echo $this->__('Submit') ?>" class="newsbtn" value="submit"> 
      </form></div> 
    <script type="text/javascript"> 
    //<![CDATA[ 
     var newsletterSubscriberFormDetail = new VarienForm('newsletter-validate-detail'); 
    //]]> 
    </script> 
</div> 

에 subscribe.phtml를 넣어

+0

두 개의 뉴스 레터가 발송되지만 유효성 검사가 다른 뉴스 레터의 경우 작동하지 않습니다. –

+0

안녕하세요 쿠마, 위에서 언급 한 첫 번째 뉴스 레터 양식 요소에서 양식 요소 속성 값을 변경하십시오. 당신이 그렇게한다면 올바른 유효성 검사가 또한 유효해야합니다. 구현하려는 웹 사이트를 보여주십시오. –

+0

나는 위의 두 코드의 코드를 작성하고 있습니다. –

-1

두 개의 Newslette rs뿐만 아니라 유효성 검사는 나를 위해 일했다. newsletter/subscribe 파일을 복사하고 newsletter/subscribe2으로 이름을 바꿉니다. 그런 다음 뉴스 레터에서 유효성 검사 이름의 이름을 바꿉니다.

관련 문제