Hi,
On every product there is an option add to wishlist, but I do not want this option.
See screenshot attached.
How can I remove this option?
Kind Regards,
Ambervision
On every product there is an option add to wishlist, but I do not want this option.
See screenshot attached.
How can I remove this option?
Kind Regards,
Ambervision
Attachments
Add to wishlist option.png (29.2 KiB) Viewed 47853 times
Your need to edit your products.tpl
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
I was gonna put up the same question...
I deleted this part from product/category.tpl
and text "null" appears on the location where the 'add to wish list" was..
I deleted this part from product/category.tpl
Code: Select all
<div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div>
and text "null" appears on the location where the 'add to wish list" was..
I had the same issue. But it's not as simple as the current responses. You need to look through several templates and the php files to fully disable wishlists.
I find it best to comment lines out rather than delete them. And make a back up of any file you're editing.
Wishlist appears in all these files:
\admin\controller\setting\setting.php (20 hits)
\admin\controller\setting\store.php (24 hits)
\admin\language\english\setting\setting.php (2 hits)
\admin\view\template\setting\setting.tpl (7 hits)
\admin\view\template\setting\store_form.tpl (7 hits)
\catalog\controller\account\account.php (4 hits)
\catalog\controller\account\wishlist.php (26 hits)
\catalog\controller\common\footer.php (4 hits)
\catalog\controller\common\header.php (6 hits)
\catalog\controller\module\account.php (4 hits)
\catalog\controller\product\category.php (2 hits)
\catalog\controller\product\manufacturer.php (2 hits)
\catalog\controller\product\product.php (2 hits)
\catalog\controller\product\search.php (2 hits)
\catalog\controller\product\special.php (2 hits)
\catalog\language\english\account\account.php (1 hits)
\catalog\language\english\account\wishlist.php (1 hits)
\catalog\language\english\common\footer.php (1 hits)
\catalog\language\english\common\header.php (1 hits)
\catalog\language\english\english.php (1 hits)
\catalog\language\english\module\account.php (1 hits)
\catalog\view\javascript\common.js (3 hits)
\catalog\view\theme\default\stylesheet\stylesheet.css (29 hits)
\catalog\view\theme\default\template\account\account.tpl (2 hits)
\catalog\view\theme\default\template\account\wishlist.tpl (3 hits)
\catalog\view\theme\default\template\common\footer.tpl (2 hits)
\catalog\view\theme\default\template\common\header.tpl (3 hits)
\catalog\view\theme\default\template\module\account.tpl (2 hits)
\catalog\view\theme\default\template\product\category.tpl (7 hits)
\catalog\view\theme\default\template\product\manufacturer_info.tpl (7 hits)
\catalog\view\theme\default\template\product\product.tpl (2 hits)
\catalog\view\theme\default\template\product\search.tpl (7 hits)
\catalog\view\theme\default\template\product\special.tpl (7 hits)
\install\opencart.sql (3 hits)
\system\library\customer.php (12 hits)
I would like to tell you how I dealt with it, but I've already heavily edited my templates so could easily point you the wrong direction.
This list is a strong argument IMHO for some on/off switches in the back end. (Same for breadcrumbs actually).
Good luck
I find it best to comment lines out rather than delete them. And make a back up of any file you're editing.
Wishlist appears in all these files:
\admin\controller\setting\setting.php (20 hits)
\admin\controller\setting\store.php (24 hits)
\admin\language\english\setting\setting.php (2 hits)
\admin\view\template\setting\setting.tpl (7 hits)
\admin\view\template\setting\store_form.tpl (7 hits)
\catalog\controller\account\account.php (4 hits)
\catalog\controller\account\wishlist.php (26 hits)
\catalog\controller\common\footer.php (4 hits)
\catalog\controller\common\header.php (6 hits)
\catalog\controller\module\account.php (4 hits)
\catalog\controller\product\category.php (2 hits)
\catalog\controller\product\manufacturer.php (2 hits)
\catalog\controller\product\product.php (2 hits)
\catalog\controller\product\search.php (2 hits)
\catalog\controller\product\special.php (2 hits)
\catalog\language\english\account\account.php (1 hits)
\catalog\language\english\account\wishlist.php (1 hits)
\catalog\language\english\common\footer.php (1 hits)
\catalog\language\english\common\header.php (1 hits)
\catalog\language\english\english.php (1 hits)
\catalog\language\english\module\account.php (1 hits)
\catalog\view\javascript\common.js (3 hits)
\catalog\view\theme\default\stylesheet\stylesheet.css (29 hits)
\catalog\view\theme\default\template\account\account.tpl (2 hits)
\catalog\view\theme\default\template\account\wishlist.tpl (3 hits)
\catalog\view\theme\default\template\common\footer.tpl (2 hits)
\catalog\view\theme\default\template\common\header.tpl (3 hits)
\catalog\view\theme\default\template\module\account.tpl (2 hits)
\catalog\view\theme\default\template\product\category.tpl (7 hits)
\catalog\view\theme\default\template\product\manufacturer_info.tpl (7 hits)
\catalog\view\theme\default\template\product\product.tpl (2 hits)
\catalog\view\theme\default\template\product\search.tpl (7 hits)
\catalog\view\theme\default\template\product\special.tpl (7 hits)
\install\opencart.sql (3 hits)
\system\library\customer.php (12 hits)
I would like to tell you how I dealt with it, but I've already heavily edited my templates so could easily point you the wrong direction.
This list is a strong argument IMHO for some on/off switches in the back end. (Same for breadcrumbs actually).
Good luck
I would suggest you don't touch anything but the template files. There's a lower chance of breaking stuff that way, and it would be easier to revert in case you wanted to add the wishlist back.
I needed to remove it as well and it was enough to remove it from the template like one of the answers above mentions. You also need to remove it from inside the JavaScript functions in the template - that's why the poster above is seeing "null". I don't have access to the files right now otherwise I'd tell you exactly what you need to remove from your template.
I needed to remove it as well and it was enough to remove it from the template like one of the answers above mentions. You also need to remove it from inside the JavaScript functions in the template - that's why the poster above is seeing "null". I don't have access to the files right now otherwise I'd tell you exactly what you need to remove from your template.
Last edited by pthesis on Sun Jun 26, 2011 1:23 am, edited 1 time in total.
chokoret wrote:I was gonna put up the same question...
I deleted this part from product/category.tpl
Code: Select all
<div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div>
and text "null" appears on the location where the 'add to wish list" was..
this is where I commented out and add to wish list as well as null were gone:
Code: Select all
<div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><!--<?php echo $button_wishlist; ?>--></a></div>
Remove these two lines in category.tpl:
html += ' <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
html += ' <div class="compare">' + $(element).find('.compare').html() + '</div>';
and these two lines in product.tpl:
<div><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br />
<a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></div>
+ remove from manufacturer_info.tpl:
html += ' <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
html += ' <div class="compare">' + $(element).find('.compare').html() + '</div>';
It seems to work for me at least.
html += ' <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
html += ' <div class="compare">' + $(element).find('.compare').html() + '</div>';
and these two lines in product.tpl:
<div><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br />
<a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></div>
+ remove from manufacturer_info.tpl:
html += ' <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
html += ' <div class="compare">' + $(element).find('.compare').html() + '</div>';
It seems to work for me at least.
Anbefalt vibrator
Dildo i glass og metall
Myke sex leketøy i silikon
This is great. I had the same issues as well. I also agree that we should not edit the PHP files. There is no reason to. The user only sees your Views anyway and keeping the PHP files intact is perfectly fine. If you edit the PHP files, you never know what you will break since other PHP code is relying and pointing to other code, especially in MVC frameworks.
Comment out the views only.
Comment out the views only.
Don't forget to edit the Header and Footer tpls also, if only for aesthetics.
Tromas wrote:Remove these two lines in category.tpl:
html += ' <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
html += ' <div class="compare">' + $(element).find('.compare').html() + '</div>';
and these two lines in product.tpl:
<div><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br />
<a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></div>
+ remove from manufacturer_info.tpl:
html += ' <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
html += ' <div class="compare">' + $(element).find('.compare').html() + '</div>';
It seems to work for me at least.
Do Tromas' method so that it doesnt work and appear on any pages.
Then go to (/catalog/view/theme/default/template/common) and comment out from header.tpl and delete line from footer.tpl
Thanks Tromas, nyltak it works 100% fine for me.
Cheers!
Christian
Then go to (/catalog/view/theme/default/template/common) and comment out from header.tpl and delete line from footer.tpl
Thanks Tromas, nyltak it works 100% fine for me.

Cheers!
Christian
My Extensions
OpenCart Developer (OCD) Tools
Donate - If I ever helped you.
You must edit 2 files under your template folder (catalog/view/theme/your template name/template/product/):
1. product.tpl
2. category.tpl
For both files, edit by commenting codes as follows:
<div class="more_actions">
<div class="wishlist"><!--<a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a>--></div>
<div class="compare"><!--<a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a>--></div>
</div>
Result: No wishlist nor Compare and yes, no more null error.
Got it working thru trial and error.
1. product.tpl
2. category.tpl
For both files, edit by commenting codes as follows:
<div class="more_actions">
<div class="wishlist"><!--<a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a>--></div>
<div class="compare"><!--<a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a>--></div>
</div>
Result: No wishlist nor Compare and yes, no more null error.
Got it working thru trial and error.
Here's a short tutorial how to do this simply and fast:
http://e-shopblog.com/opencart/how-to-r ... duct-page/
http://e-shopblog.com/opencart/how-to-r ... duct-page/
Prestashop for that remedy, and "probably" (run it verbatim through engines) taken from old and recent OC forum threads in the first place?! (1) It specifically speaks to removing the offense "from the product page in OpenCart". That is high above in this thread, appears in scores of other prior threads, and seems not to satisfy folks above who wanted to launch editorial platoons and divisions on hapless dozes of files. (2) It specifically recommends simply <!--commenting out// --> the block that paints the offense. That is already long since on record in OC threads. Good grief.
Folks, the more files you edit, the more you'll need to PROOFREAD your changes, and you can set quite a few files at once into a competent ascii text editor in order to "change all files" at once for each change in the essentially identical blocks. Back 'em up first.
Folks, the more files you edit, the more you'll need to PROOFREAD your changes, and you can set quite a few files at once into a competent ascii text editor in order to "change all files" at once for each change in the essentially identical blocks. Back 'em up first.
Hello,
in order to remove wishlist and compare i just opened catalog/view/javascript/common.js and added
$(".wishlist").hide();
$(".compare").hide();
these two simple lines. This way, every time a page sees these two classes it will just hide them
in order to remove wishlist and compare i just opened catalog/view/javascript/common.js and added
$(".wishlist").hide();
$(".compare").hide();
these two simple lines. This way, every time a page sees these two classes it will just hide them

Who is online
Users browsing this forum: No registered users and 10 guests