首頁>Magento>source

將DemacMedia Magento-Multi-Location-Inventory擴充套件安裝到1.9.2.4商店.良好的工作和大量庫存上傳工作

添加圖片以顯示模組並解釋我想要做的事情。

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

仅在編輯产品頁面內顯示多位​​置數量資訊

我尝試了很多东西把位置+數量資訊放到 Order view page (sales_order/view/order)

尝試將以下資料的變體添加到

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

但没有改變.我想在查看订單頁面看到下面的資料(位置+數量).

$this->getLocationsInventories() as $_location)
$_location['code'], $_location['qty']

下面的代碼是模組的原始多位置檔案.

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>
最新回復
  • 2019-12-5
    1 #

    在表格之前添加此內容< / p>

    /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 
        }
    ?> 
    

  • magento 1.9:我在EC2上的域名有問题
  • magento 1.9:如果文章y在购物車中是N次,則免费提供第X條之一