Magento 2 Shopping Cart表项目,带有选项

时间:2019-05-29 03:32:16

标签: php layout magento2

我是Magento的新手,无法使用选项修改“购物车”行项目。

我在此处添加了名为“股票”的新HTML“列”:

应用程序/代码/XXXX/YYYY/view/frontend/templates/cart/form.phtml

<thead>
            <tr>
                <th class="col item" scope="col"><span><?= /* @escapeNotVerified */ __('Nama Product') ?></span></th>
                <th class="col stock" scope="col"><span><?= /* @escapeNotVerified */ __('Stock') ?></span></th>
                <th class="col price" scope="col"><span><?= /* @escapeNotVerified */ __('Harga Satuan') ?></span></th>
                <th class="col qty" scope="col"><span><?= /* @escapeNotVerified */ __('Jumlah') ?></span></th>
                <th class="col subtotal" scope="col"><span><?= /* @escapeNotVerified */ __('Subtotal') ?></span></th>
            </tr>
        </thead>

这是我的应用/代码/XXXX/YYYY/view/frontend/templates/cart/item/default.phtml

    <td class="col">
        Siap Kirim
    </td>

enter image description here

这是结果。

enter image description here

外观,“ Bess Yoga Short”没有“股票”列。

现在,我将尝试将其设置为空文件app / code / XXXX / YYYY / view / frontend / templates / cart / item / default.phtml ,这就是结果。

enter image description here

是的,结果仍然是显示名称为“ Bess Yoga Short”的产品,这就是为什么它忽略了default.phtml中的所有更改。

我的问题是如何为带有和额外选项的产品在购物车表中添加列? 似乎没有使用default.phtml作为其行布局。

非常感谢您提供任何帮助。

0 个答案:

没有答案