Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Destroyed a File-Can You Help? 
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

I am a dope.  I just destroyed a file and need it back.  Intact and quickly so that I might get on with my going cross-eyed reading code.

1.1

Mage/Sales/Model/Order/Invoice.php

Can somebody post it for me?  Please? Please?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sebastian G
Guru
 
Total Posts:  336
Joined:  2007-09-15
 

Is it for 1.1.8 that you need the file? if not can you specify the version?

 
Magento Community Magento Community
Magento Community
Magento Community
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

Tomas G.  Thanks for responding.  1.6....I see that I started typing and left in incomplete.  HELP...so much work to do.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sebastian G
Guru
 
Total Posts:  336
Joined:  2007-09-15
 

No problem here you go smile
Note: This is Core Standard file for Magento 1.1.6 i hope it helps

File Attachments
Invoice.php  (File Size: 21KB - Downloads: 44)
 
Magento Community Magento Community
Magento Community
Magento Community
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

Tomas.  Thank you.  Thank you.  Thank you.  Have a wonderful Holiday Season!!  Bless your Heart!  You are a Prince!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Damian Culotta
Enthusiast
 
Total Posts:  878
Joined:  2008-12-10
Argentina
 

@WinginIt

Remember that you can doanload previous versions form the doanload page.

@Tomas

Today I’m following your steps.
wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sebastian G
Guru
 
Total Posts:  336
Joined:  2007-09-15
 

@WinginIt: Damián is totally right, though i’m glad to help. Happy Holidays Season to you as well smile

@Damián:  LOL Stop chasing me! (kidding)

 
Magento Community Magento Community
Magento Community
Magento Community
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

uh, Tomas...you still out there?  Thought I was in great shape but am encountering errors when I try to invoice:

Fatal error: Call to undefined method Mage_Sales_Model_Entity_Order_Invoice_Comment_Collection::setCreatedAtOrder() in /nfs/c01/h03/mnt/xxxxx/domains/xxxxxxxxxxx.com/html/app/code/core/Mage/Sales/Model/Order/Invoice.php on line 517

and I seem to have lost all payment history:  Same as above.

Would you email me so that I don’t have to have my slip showing in front of everyone for this dunce-dom?  I am wondering if the “web dev.” guy didn’t change versions when he did a second installation about a week after the first install last month. 

I know....but I am a frontend person forced to do the backend things that a good frontend person wants done!!  Make sense?  Am trying to reach the guy.....still waiting for a call back.........har!

(The complexion of the order is much nicer with the version that I uploaded though!!)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sebastian G
Guru
 
Total Posts:  336
Joined:  2007-09-15
 

hmm… strange… does the file contain this between lines 512 and 521

{
        
if (is_null($this->_comments) || $reload{
            $this
->_comments Mage::getResourceModel('sales/order_invoice_comment_collection')
                ->
addAttributeToSelect('*')
                ->
setInvoiceFilter($this->getId())
                ->
setCreatedAtOrder();
            if (
$this->getId()) {
                
foreach ($this->_comments as $comment{
                    $comment
->setInvoice($this);
                
}

Btw, have you installed any add on?

 
Magento Community Magento Community
Magento Community
Magento Community
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

Nope - no add-ons.  I am looking now.  Still can’t reach guy to learn any more.  Pooh-balls!


Looks exactly like that.  Version problems I suspect.  Am reading my Shipment.php for similarities, now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sebastian G
Guru
 
Total Posts:  336
Joined:  2007-09-15
 

Have you refreshed Magento’s cache? (i forgot to ask) red face

 
Magento Community Magento Community
Magento Community
Magento Community
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

Just did.  No change yet.

EDIT You know, my copyrights are 2004-2007!  Could I really have 1.1 afterall?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sebastian G
Guru
 
Total Posts:  336
Joined:  2007-09-15
 

You can actually check your version at Mage.php file (in app)
If indeed you’re running 1.1.6 then between lines 83 and 86 you should see this:

public static function getVersion()
    
{
        
return '1.1.6';
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

Does it make sense that a (just past ) mid-Nov., new installation would be Version 1.0??  Old files carry 3/08 dates. Oh Brother.  Sorry.

EDIT Jeez, it’s right on the bottom of the admin.....1.0.  I know I had seen 1.16...but then I spotted a 1.1??????

I AM an eedjit child.....an old child.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top