Mike
Mike

Reputation: 1

‘Submit Review’ button not working, instead add’s product to cart

I have in: 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

<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

<?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.

Upvotes: 0

Views: 953

Answers (1)

Rob
Rob

Reputation: 953

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.

Upvotes: 2

Related Questions