0

私のタイトルが言うように、magento ショッピング カートで数量編集を無効にする方法はありますか? 現在、magento にテキストボックスが表示されています。数量をプレーンテキストで表示するか、テキストボックスを無効にしたいです。

4

2 に答える 2

1

.phtmlこのファイルは にあると思いapp/design/frontend/base/default/checkoutますので、ある場合は、ファイルをコピーして、独自のカスタム テーマ ( app/design/frontend/[custom_package]/[custom_theme]/template/checkout/...) に貼り付けてください。

.phtmlそのテンプレート ファイルで、テキスト ボックスを読み取り専用に変更するか、必要に応じて変更します。

コア ファイルを変更することはお勧めできません。コードについてapp/design/は、独自のパッケージ/テーマを作成し、デフォルトのコンテンツをコピーして貼り付けてそこに変更することをお勧めします (パッケージ/テーマが管理パネルで設定されていることを確認してください)。

元のファイルの場所:/app/design/frontend/base/default/template/checkout/cart/item

于 2012-12-13T17:28:38.920 に答える
0

はい、パス app\design\frontend\base\default\template\catalog\product\view\addtocart.phtml に移動してください。

  <?php $_product = $this->getProduct(); ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<?php if($_product->isSaleable()): ?>
    <div class="add-to-cart">
        <?php if(!$_product->isGrouped()): ?>
        <label for="qty"><?php echo $this->__('Qty:') ?></label>
        <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
        <?php endif; ?>
        <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
        <?php echo $this->getChildHtml('', true, true) ?>
    </div>
<?php endif; ?>

入力タグをテキストに編集するか、必要に応じてコメントアウトします

于 2012-12-13T17:29:09.523 に答える