0
マゼンタを初めて使用しています。私はすべての製品ページに表示したいフォームを作成しました。価格が変更された場合、通知するメールと価格をユーザーに尋ねるだけです。それは動作しますが、問題は、ブロックが<reference name="content">
タブの内側にある場合にのみ機能します。もし私がどこに置いてもそれ以外のところに私はそれを見ることができますが、フォームは動作しません。ここに私のレイアウトファイルのコードです。私はちょうど私がやっているものがあるかどうかを知る必要があり、間違ったあなたはこれを貼り付ける必要があり、ここで マゼンタブロックが製品ページで動作しない
<layout>
<catalog_product_view>
<reference name="content">
<!-- <reference name="product.info">
<reference name="alert.urls"> -->
<block type="catalog/product_view" before="-" name="ecom_pricenotify.temp" template="ecom_pricenotify/temp.phtml" />
<!-- </reference>
</reference> -->
</reference>
</catalog_product_view>
があなたの
catalog/product/view.phtml
テンプレートで
<div style="border:0px solid red; margin:0px auto;">
<?php $_product = $this->getProduct(); ?>
<form id="test" action="<?php echo Mage::getUrl('pricenotify/pricenotify/db') ?>" method="post">
<label for="price">Price *</label>
<input type="text" id="price" name="price" value="" class="required-entry validate-number"/><br />
<label for="email">Email Address *</label>
<input type="text" id="email" name="email" value="" class="required-entry validate-email"/>
<input type="hidden" id="id" name="id" value="<?php echo $_product->getId() ?>" />
<input type="hidden" id="propri" name="propri" value="<?php echo $_product->getPrice() ?>" />
<input type="submit" name="submit" value="<?php echo $this->__('Submit') ?>" onclick="if(customForm.validator && customForm.validator.validate()) this.form.request(); return false;" />
</form>
<script type="text/javascript">
//< ![CDATA[
var customForm = new VarienForm('test',false);
//]]>
</script>
コアファイルの編集は間違っていません。 –
まあ、はい。独自のテーマを作成する必要があります。 [このガイド]を参照してください(http://www.magentocommerce.com/design_guide/articles/working-with-magento-themes) – vsushkov
私はそれが動作するかどうかを確認するためにマゼンタのテーマを利用したいです。私は必要と思わない私をからテストするためのテーマを作成する –