hello, i'm tring to add the "add to cart" button on every product shown when i click a category so a customer can directly add to cart the article without going in the details of product
if i use this i have an advice of undefined variable product_id
i try i have an advice of udefined index id
how can i do?
thanks to all replies
if i use this i have an advice of undefined variable product_id
i try i have an advice of udefined index id
how can i do?
thanks to all replies
after a few test i found this solution:
!!!try this solution at your own risk!!!
first backup your opencart db and installation!
in the file opencart\catalog\controller\category.php
line 72 add:
then line 79 add:
then line 80 add:
now in the file opencart\catalog\template\category.tpl
add "" method="post" enctype="multipart/form-data">" after "" line
then add "" />
" after "" line before ""
it seems to work
!!!try this solution at your own risk!!!

first backup your opencart db and installation!
in the file opencart\catalog\controller\category.php
line 72 add:
Code: Select all
'id' => $result['product_id'],
Code: Select all
$query = array();
Code: Select all
$view->set('action_cart', $url->href('product', FALSE, $query));
add "" method="post" enctype="multipart/form-data">" after "" line
then add "" />
" after "" line before ""
it seems to work
could you post the code around those "added" codes of yours? so we can find it with a better ease.
___________________________________________________________
http://www.monnaiesjdcoins.com (still in the works)
I tested this solution of yours on my test server and no in fact is does not work.
___________________________________________________________
http://www.monnaiesjdcoins.com (still in the works)
Who is online
Users browsing this forum: No registered users and 7 guests