0

I've been trying for days now to get a rewritten model to function. but it doesn't work, I'm puzzled because all seems to be correct.

___Here's my config file : etek/advancednewslettercoupon/etc/config.xml

    <global>
          <models>
            <advancednewslettercoupon>
                <class>Etek_AdvancedNewsletterCoupon_Model</class>
            </advancednewslettercoupon>
            <advancednewsletter>
                <rewrite>
                  <subscriber>Etek_AdvancedNewsletterCoupon_Model_Subscriber</subscriber>
                <rewrite>
            </advancednewsletter>
          </models>
       </global>

__the subscriber model: Etek/AdvancedNewsletterCoupon/Mode/Subscriber.php

class Etek_AdvancedNewsletterCoupon_Model_Subscriber extends AW_Advancednewsletter_Model_Subscriber
  {
    _construct() {
        var_dump('Etek Subscriber');die(get_class($this));
    }
    public function subscribe($email, $segments, $params = array())
    {  echo"<pre>";die('Etek Subscriber');
  }

___Etek_AdvancedNewsletterCoupon.xml

<?xml version="1.0"?>
 <config>
    <modules>
        <Etek_AdvancedNewsletterCoupon>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
              <AW_Advancednewsletter/>
            </depends>
        </Etek_AdvancedNewsletterCoupon>
    </modules>
 </config>

Let me know if anyone has a solution.

0

I found out that I was missing to close the rewrite tag now all works fine.

<rewrite>
 <subscriber>Etek_AdvancedNewsletterCoupon_Model_Subscriber<subscriber>
</rewrite>
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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