IMPORTANT - STOP DOUBLE CHARGING

Report issues with Enuuk Auction Platform or Mods here - remember to raise a ticket with phpauction.net as well
Post Reply
RWAP
Site Admin
Posts: 748
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent
Contact:

IMPORTANT - STOP DOUBLE CHARGING

Post by RWAP » Wed Aug 08, 2012 12:07 pm

Can anyone please verify that on a standard Enuuk setup, if you sell a fixed price item, you get charged the final value fee twice ??

I have overcome this issue by amending class\OfferObserver\FinalValueFeeObserver.php

Find the bottom of the code which has:

Code: Select all

                    $notificator->send($par['email'],
                                $fromMail, $fromMailName,
                                MailNotificator::MAIL_DUE_FEE,
                                $subject->item->user->userLanguage,
                                $par);
                }
            }
Add the following line:

Code: Select all

            $subject->lastEvent=null;

DO NOT USE - SEE CODE BELOW

RWAP
Site Admin
Posts: 748
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent
Contact:

Re: IMPORTANT - STOP DOUBLE CHARGING

Post by RWAP » Thu Nov 15, 2012 7:21 pm

I have found that in certain circumstances, this can prevent the keyword observer working - therefore to overcome this, REMOVE THE ABOVE CHANGE and instead, in class\Offer.php find:

Code: Select all

    public function notify()
    {
        if($this->observers){
            foreach($this->observers as $obs){
                $obs->update($this);
            }
        }
    }
and change this to:

Code: Select all

    public function notify()
    {
        if($this->observers){
            foreach($this->observers as $obs){
                $this->detach($obs); // Prevent double calling for offer
                $obs->update($this); 
            }
        }
        $this->lastEvent = null;
    }
Last edited by RWAP on Fri Nov 16, 2012 7:56 pm, edited 1 time in total.
Reason: Altered order of code

RWAP
Site Admin
Posts: 748
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent
Contact:

Re: IMPORTANT - STOP DOUBLE CHARGING

Post by RWAP » Mon Mar 16, 2015 10:35 pm

This appears to have been fixed in v3.5

RWAP
Site Admin
Posts: 748
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent
Contact:

Re: IMPORTANT - STOP DOUBLE CHARGING - FIXED IN V3.5

Post by RWAP » Thu Apr 30, 2015 11:55 am

Actually, whether this is required appears to depend on the version of Linux, which is a real pain.

The change above is definitely required on Centos 5, but on Centos 7 stops the final value fee being charged!

Another potential solution which appears to work on Centos 5 (at least - to be tested on Centos 7) is to change the notify function to read:

Code: Select all

    public function notify()
    {
        if ($this->observers) {
            foreach ($this->observers as $obs) {
                $obs->update($this);
            }
        }
        $this->observers = null;
    }

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests