[英]‘Submit Review’ button not working, instead add’s product to cart
I have in: default/style/template/review/form.phtml
我在以下位置:
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>
I have in: app/design/frontend/default/YourTheme/layout/catalog.xml
我在:
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>
I have in: app/design/frontend/default/YourTheme/template/catalog/product/view.phtml
我在以下位置:
app/design/frontend/default/YourTheme/template/catalog/product/view.phtml
<?php echo $this->getChildHtml('product_review') ?>
On the product page have I button Review, if you place a review then don't save the review and the product added to the cart. 在产品页面上,有I按钮“审阅”,如果您发表评论,则不要保存该评论并将产品添加到购物车。
Go into your browser and view page source. 进入浏览器并查看页面源。 I'm almost positive you have nested forms.
我几乎肯定你有嵌套表格。 I can't say what the exact structure may be, however, based upon theme edits you could end up with this.
我不能说确切的结构是什么,但是根据主题编辑,您可能最终会遇到这种情况。
<form id="your ID of review>
<form id="your ID of add to cart>
</form>
</form>
If this happens when you click submit of the review you could be submitting the add to cart. 如果在单击评论的提交时发生这种情况,则可以将添加到购物车中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.