when i click on the product at the home page i would like to add this product to cart directly without additional product info page
please help
There is a conversation about this happening here:
http://forum.opencart.com/index.php/topic,1809.0.html
It's about to be released as a contribution for the category list, was looking into making it available on the home page too.
http://forum.opencart.com/index.php/topic,1809.0.html
It's about to be released as a contribution for the category list, was looking into making it available on the home page too.
thanks but,
i think that does not solve my problem, i dont need product options, i just need products to be added to the cart directly when clicking on it, at the home page, i know thats not a huge problem and i would really appreciate if someone could help me with this, thanks.
i think that does not solve my problem, i dont need product options, i just need products to be added to the cart directly when clicking on it, at the home page, i know thats not a huge problem and i would really appreciate if someone could help me with this, thanks.
Last edited by Zviadi on Wed Oct 15, 2008 2:54 pm, edited 1 time in total.
Mr Search helps me. I love Mr SearchZviadi wrote: if someone could help me with this, thanks.

It is in here. I found it one night but I can't quickly find it again so try this
in the file opencart\catalog\controller\category.php
Code: Select all
line 72 add under $product_data[] = array(
Code:
'id' => $result['product_id'], // Added for Add TO Cart button on Category Page
Code: Select all
// Added for Add TO Cart button on Category Page
$query = array();
$view->set('action_cart', $url->href('product', FALSE, $query));
// END Mod
now in the file opencart\catalog\template\category.tpl
add
Code: Select all
"<form action="<?php echo $action_cart; ?>" method="post" enctype="multipart/form-data">"
Code: Select all
"<div class="products">"
then add
Code: Select all
"<input type="hidden" name="product_id" value="<?php echo $product['id']; ?>" />
<input type="submit" value="Buy Now" />
</form>"
If that's not it, then ask Mr Search
If it is it, can you post back here please so others can find it. Thanks.
Well it would help your problem. Options are just one part of it. The other part of it is to add an "Add to cart" button as well. Currently it doesn't do this for the home page, only the category page, but it is planned. For now, jty's method should do what you want.Zviadi wrote: thanks but,
i think that does not solve my problem, i dont need product options, i just need products to be added to the cart directly when clicking on it, at the home page, i know thats not a huge problem and i would really appreciate if someone could help me with this, thanks.
Who is online
Users browsing this forum: No registered users and 1 guest