Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:30:21+00:00 2026-06-07T13:30:21+00:00

So when you do a credit memo in Magento, it sets the stock back

  • 0

So when you do a credit memo in Magento, it sets the stock back to the correct level but does not change the “out of stock” back to “in stock” (if applicable). I came across this post by Wright Creatives (http://wrightcreativelabs.com/blog/55-credit-memo-in-stock.html) and it solves this problem. However, the method is too slow! It takes about 30 seconds per product.

I’ve ultimately had to remove this as a solution (because of the “speed”) and now my boss would like the functionality reimplemented.

I know that the is_in_stock data controls this & I’m wondering if there is already a module out there, an article/tutorial, or someone who can help me get started on a “better/faster” solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:30:23+00:00Added an answer on June 7, 2026 at 1:30 pm

    I know it’s old but because this isn’t yet fixed not even in 1.7.0.1 I came up with a better solution.

    Tested on 1.5.1 and above:

    \app\code\core\Mage\CatalogInventory\Model\Observer.php

    in

    public function refundOrderInventory($observer)

    after

    Mage::getSingleton('cataloginventory/stock')->revertProductsSale($items);
    
        //add this
        foreach ($creditmemo->getAllItems() as $item) {
            $productId = $item->getProductId();
            $product = Mage::getModel('catalog/product')->load($productId);
    
            if(!$product->isConfigurable()){
    
                $stockItem = $product->getStockItem();
    
                //$stockItem->setQty($item->getQty());
                $stockItem->setIsInStock(1);
                $stockItem->save();
    
                $product->setStockItem($stockItem);
                $product->save();
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an application that accepts credit card orders, but does not programatically authorize
when we credit memo an order the reward points are not being removed –
Storing credit card information securely and legally is very difficult and should not be
Does JQueryMobile have good support for entering credit card information. Users have a really
I know obviously that credit card info should be encrypted, but should credit SCORES
I need to verify a credit card (dummy - i'm not doing any transaction
How can I have the same number count for invoice and credit memo in
I am working on Magento Quick book project. I am want to get Credit
Often I have stored credit card numbers in varchar(16) . That works, but it
How do I accept credit card payments inside a C# app? I'll use some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.