1

昨日、Magento での製品リストのサイズの変更について、こちらに質問を投稿しました。 私の問題に対処することになると、アラは非常に役に立ち、私は多くの進歩を遂げました. しかし、私は今、誰かが私を助けてくれることを望んでいるいくつかの新しい問題に遭遇しました.

現在、私のサイトの製品リストは次のようになっています: http://soundcherry.com/index.php/sound-effects.html

これは、list.phtml ファイル (app/design/frontend/base/default/template/catalog/product/list.phtml) の一部と、styles.css ファイル (skin/frontend/default/f002/css) を変更することによって実現されました。 /styles.css)。

しかし、変更を加えた後、製品リストのカートに追加するボタンが機能しなくなりました。だから、私の知識不足を考えると、何かを台無しにしてしまったようです。現在、list.phtml ファイルのボタンのコードは次のようになっています。

<p style="display:inline"><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class= button btn-cart""onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button><P>

私は何を台無しにしましたか?

また、リスト ビュー内の各製品の周囲の間隔が少し大きくなっています。とにかくスペースの量を減らすことができますか?リスト ビューを処理する styles.css ファイルの一部は、現在次のようになっています。

/* View Type: List */
.products-list li.item { border-bottom:1px solid #d9ddd3; padding:1px 1px; }
.products-list li.item.last { border-bottom:1px; padding:25px 1px; }
.products-list .product-image { float:left; width:40px; height:40px; margin:0 0 1px; }
.products-list .product-image img { width:40px; height:40px; }
.products-list .product-shop { margin-left:55px; }
.products-list .product-name { margin:0 0 5px; font-weight:bold; font-size:13px; color:#203548; }
.products-list .product-name a { color:#203548; }
.products-list .price-box { float:left; margin:3px 13px 5px 0; }
.products-list .availability { float:left; margin:3px 0 0; }
.products-list .desc { clear:both; padding:6px 0 0; margin:0 0 15px; line-height:1.35; }
.products-list .desc .link-learn { font-size:11px; }
.products-list .add-to-links { clear:both; }
.products-list .add-to-links li { display:inline; }
.products-list .add-to-links .separator { display:inline; margin:0 2px; }

間隔を修正する場所がどこにもありません。何か不足していますか、それとも別のファイルにあるのでしょうか?

私はhtml/cssとMagentoの完全なアマチュアなので、どんな助けでも大歓迎です。

4

1 に答える 1

3

firebugを使用すると、エラーが表示されるカートに追加ボタンの次のHTMLコードが表示されます。

 <button btn-cart""onclick="setLocation('http://soundcherry.com/index.php/sound-effects/this-is-a-test-product.html?options=cart')" class="button" title="Add to Cart" type="button"><span><span>Add to Cart</span></span></button>

正しい構文は次のとおりです。

<button class="button btn-cart" onclick="setLocation('http://soundcherry.com/index.php/sound-effects/this-is-a-test-product.html?options=cart')"  title="Add to Cart" type="button"><span><span>Add to Cart</span></span></button>
于 2013-07-01T05:06:55.417 に答える