Hi
Is it possible to, when clicking the Add to cart button on the category page, to go to the product detail page instead of adding the product to the cart? On the product page the button should of course add the product to the cart.
I have tried fixing it in the admin by setting the minimum quantity på 0 (zero), but it still add 1 product to the cart.
Best,
Magnus
Solved! Go to Solution.
I think you should change some code lines:
You find button add to cart:
I use rwd package.
#app/design/frontend/rwd/default/template/catalog/product/list.phtml
<?php echo $this->getAddToCartUrl($_product) ?>
And change to:
<?php echo $_product->getProductUrl() ?>
Hope this works for you.
I think you should change some code lines:
You find button add to cart:
I use rwd package.
#app/design/frontend/rwd/default/template/catalog/product/list.phtml
<?php echo $this->getAddToCartUrl($_product) ?>
And change to:
<?php echo $_product->getProductUrl() ?>
Hope this works for you.
Thanks!
I will try this.
// Magnus
Hi Brake6,
My code lines doesn't solve your problem? If still not ok, I will try to find an other way.
Hi MrKhoa99
First, I'm very sorry for a late reply.
Second, the solution was so simple so I missed it totally. In the category list file (app/design/frontend/my-theme/default/template/catalog/product/list.phtml) just change the onclick event for the add-to-cart button to (around line #89):
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $_product->getProductUrl() ?>')"><span><span><?php echo $this->__('View product') ?></span></span></button>
It's the same link as on the images a-tag.
// Magnus
Hello Brake6,
Yes, my solution is also very simple.