“提交评论”按钮不起作用,而是将产品添加到购物车

时间:2014-07-28 13:11:29

标签: php magento

我在:default/style/template/review/form.phtml

<div class="buttons-set"><button type="submit" title="<?php echo $this->__('Submit Review') ?>" class="button"><span><span><?php echo $this->__('Submit Review') ?></span></span></button></div>

我在:app/design/frontend/default/YourTheme/layout/catalog.xml

<block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml"><block type="review/form" name="product.review.form" as="review_form"/></block> 

我在:app/design/frontend/default/YourTheme/template/catalog/product/view.phtml

<?php echo $this->getChildHtml('product_review') ?>

在产品页面上有我按钮评论,如果您进行评论,则不要保存评论并将产品添加到购物车。

1 个答案:

答案 0 :(得分:2)

进入浏览器并查看页面来源。我几乎肯定你有嵌套表格。我不能说具体的结构是什么,但是,基于主题编辑你可能最终得到这个。

<form id="your ID of review>

        <form id="your ID of add to cart>
        </form>
</form>

如果您在点击提交评论时发生这种情况,则可以提交添加到购物车。

相关问题