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



我在: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') ?>

在产品页面上有I按钮评论,如果您放置评论,则不保存评论和产品添加到购物车。

进入浏览器并查看页面源代码。我几乎可以肯定你有嵌套表单。我不能说确切的结构可能是什么,但是,基于主题编辑,你可能会得到这样的结果。

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

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

最新更新