0

DemacMedia Magento-Multi-Location-Inventory extension installed to 1.9.2.4 store. Working good and mass stock upload is also working

Added picture to show module and explaining what I want to do.

https://github.com/DemacMedia/Magento-Multi-Location-Inventory

It is showing Multi-Location QTY info only inside of Edit Product Page

I tried many things to put Location+QTY info to Order view page (sales_order/view/order)

Tried to add variation of below data to

app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml

but nothing changed. I want see below data (location+qty) at view order page.

$this->getLocationsInventories() as $_location)

$_location['code'], $_location['qty']

Below code is original Multi-location file of module.

app\design\adminhtml\default\default\template\demac\catalog_multilocationinventory.phtml

<?php foreach ($this->getLocationsInventories() as $_location): ?>
                    <tr>
                        <td>
                            <?php echo $_location['name'] ?>
                        </td>
                        <td>
                            <input type="text"
                                   name="multilocationinventory[<?php echo $_location['id'] ?>][quantity]"
                                   class="input-text validate-number"
                                   <?php echo ($_location['manage_stock'] === "1") ? '' : 'style="visibility:hidden;"' ?>
                                   value="<?php echo $_location['qty'] ?>"/>
                        </td>

Catalog/Manage Product + Order View Picture

0

add this before table add this

/public_html/app/design/adminhtml/default/default/template/sales/items/column/qty.phtml

  <?php $product = Mage::getModel('catalog/product')
->loadByAttribute('sku', $_item->getSku(), array('Id'));
    $locationStockCollection = Mage::getModel('demac_multilocationinventory/location')->getCollection();
    $locationStockCollection->joinStockDataOnProductAndStoreView($product->getId(), 1);
    $locations = array();
        foreach ($locationStockCollection as $locationStock) { ?>
        <tr>
    <?php if ($locationStock->getQty()>0){?>
        <td><? echo $locationStock['name'];?> </td>
        <td><strong><? echo floatval($locationStock->getQty());?> </strong></td>
    <?php } ?>

     </tr>
     <?php 
    }
?>  

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.