简体   繁体   English

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

[英]‘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.

相关问题 如何将产品再次添加到购物车或“添加到购物车”按钮不起作用? - How to add the product again to the cart or add to cart button not working? 如果我单击已在购物车中的产品的“添加到购物车”按钮,如何重定向到购物车页面 - How do I redirect to the cart page if I click on the 'Add to cart' button for a product that's already in cart 添加到购物车按钮在 Woocommerce 的单个产品页面上不起作用 - Add to cart button not working on single product page in Woocommerce AJAX添加到购物车按钮不工作自定义查询循环产品woocommerce - AJAX add to cart button not working on custom query loop product woocommerce 在提交按钮前添加 recaptcha v2 到 woocommerce 产品评论评论 - Add recaptcha v2 to woocommerce product review comment before submit button 单击“产品详细信息”页面上的“添加到购物车”按钮后,出现“请指定产品的选项”消息 - “Please specify the product's option(s)” message occuring after clicking on add to cart button on product detail page 单击“添加到购物车”按钮时,应将其禁用,直到从用户的购物车页面中删除产品为止 - when 'add to cart' button is clicked ,it should be disabled until product is removed from the user's cart page 添加产品价值以添加到购物车按钮 - add product value to add to cart button 如果产品在购物车中,则在woocommerce中添加类以添加到购物车按钮 - if product is in cart add class to add to cart button in woocommerce 自定义添加到购物车按钮,将多个产品添加到购物车中,数量:woocommerce - Custom add to cart button to add multiple product into cart with quantity :woocommerce
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM