Post by WilliamBD » Thu Feb 21, 2013 10:39 pm

Does the option to disable the 'Wish List' futionality exist?

Many Thanks

*Disclaimer: I hope I have been as clear as possible and helpful. If you are unsure of anything please ask I will be happy to help - I do frequently watch the posts I have posted in previously.

How to change prices across a whole multi-store, with a baseline price for each product:
http://forum.opencart.com/viewtopic.php ... 24#p406793


Active Member

Posts

Joined
Fri Feb 08, 2013 9:33 pm

Post by Pieter-zim » Fri Feb 22, 2013 3:55 pm

are you wanting to disable it for good, or will you bring it back at some point?

Newbie

Posts

Joined
Thu Feb 21, 2013 6:25 pm

Post by prabakaranbs » Fri Feb 22, 2013 6:05 pm

Hello WilliamBD
There is no such option available in the admin panel of the opencart to disable the 'Wish List' futionality but you can do it programatically.

Easy way is to remove the links for add to wishlist in .tpl files such as header.tpl , product.tpl and then remove the controller file from catalog/controller/account/wishlist.php

Newbie

Posts

Joined
Fri Feb 22, 2013 5:24 pm

Post by williamjay » Mon Mar 11, 2013 11:22 am

Here's the way to take it off the main page, easily. Save this in root/vqmod/xml/as_RemoveWishListLinks.xml

Code: Select all

<modification>
<id><![CDATA[remove WishList Links - frontend to start]]></id>
   <version><![CDATA[1.0 for typical OpenCart since opencart]]></version>
   <vqmver><![CDATA[2.1 - uses wildcard * path search]]></vqmver>
<author><![CDATA[William Jay - williamjay@repairman.com]]></author>

<file name="catalog/view/theme/*/template/common/header.tpl">
   <operation error="log" info="remove WishList from Header Menu">
      <search position="replace" trim ="true"><![CDATA[<a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a>]]></search>
      <add><![CDATA[
         <!--removed by design, vQmod remove_WishList_Links Line 11-->
      ]]></add>
   </operation>
</file>

<file name="catalog/view/theme/*/template/common/footer.tpl">
   <operation error="log" info="remove WishList from Footerer Menu">
      <search position="replace" trim ="true"><![CDATA[<li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>]]></search>
      <add><![CDATA[
         <!--removed by design, vQmod remove_WishList_Links, Line 20-->
      ]]></add>
   </operation>
</file>

</modification>
Using vQmod to flavour the results from the templates makes for safety and portability of your site modifications, only one file to manage any number of snips to accomplish your goals. So, now the front end is cleaned, next step go get them off the Account page.

-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 11:30 am

Add this to the file for removing from the accounts page

Code: Select all

<file name="catalog/view/theme/*/template/module/account.tpl">
   <operation error="log" info="remove WishList from Account Menu">
      <search position="replace" trim ="true"><![CDATA[<li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>]]></search>
      <add><![CDATA[
         <!--removed by design, vQmod remove_WishList_Links, Line 20-->
      ]]></add>
   </operation>
</file>


-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 11:40 am

now go and remove it from search results:

Code: Select all

<file name="catalog/view/theme/*/template/product/search.tpl">
   <operation error="log" info="remove WishList from Search Results make div disappear">
      <search position="replace" trim ="true"><![CDATA[<div class="wishlist">]]></search>
      <add><![CDATA[<div class="wishlist" style="display:none;"><!--removed by design, vQmod remove_WishList, ~Line 33-->]]></add>
   </operation>
</file>

-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 11:44 am

then take it out of category display, patterns are emerging

Code: Select all

<file name="catalog/view/theme/*/template/product/category.tpl">
   <operation error="log" info="remove WishList from Category View make div disappear">
      <search position="replace" trim ="true"><![CDATA[<div class="wishlist">]]></search>
      <add><![CDATA[<div class="wishlist" style="display:none;"><!--removed by design, vQmod remove_WishList, ~Line 41-->]]></add>
   </operation>
</file>

-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 11:50 am

take it out from product view

Code: Select all

<file name="catalog/view/theme/*/template/product/product.tpl">
   <operation error="log" info="remove WishList from Product View make it disappear in the div, leave compare">
      <search position="replace" trim ="true"><![CDATA[<a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br />]]></search>
      <add><![CDATA[<!--removed by design, vQmod remove_WishList, ~Line 47-->]]></add>
   </operation>
</file>

-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 12:02 pm

then take a break, stretch and drink some water ... then get it off of Manufacturer Info pages

Code: Select all

<file name="catalog/view/theme/*/template/product/manufacturer_info.tpl">
   <operation error="log" info="remove WishList from Mfr Info View make div disappear - same as category.tpl">
      <search position="replace" trim ="true"><![CDATA[<div class="wishlist">]]></search>
      <add><![CDATA[<div class="wishlist" style="display:none;"><!--removed by design, vQmod remove_WishList, ~Line 54-->]]></add>
   </operation>
</file>

-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 12:04 pm

take it off of special:

Code: Select all

<file name="catalog/view/theme/*/template/product/special.tpl">
   <operation error="log" info="remove WishList from Mfr Info View make div disappear - same as category.tpl,mfr_info.tpl">
      <search position="replace" trim ="true"><![CDATA[<div class="wishlist">]]></search>
      <add><![CDATA[<div class="wishlist" style="display:none;"><!--removed by design, vQmod remove_WishList, ~Line 61-->]]></add>
   </operation>
</file>


-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 12:12 pm

ok, so that will take the links, for the Wish List, from display on the default Theme and other Themes, by one vQmod, in an hour or less, conceived, devised, created, tested, implemented. No changes to core files, simply ON or OFF by Uninstall, completely portable.

-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 2:04 pm

Streamlined the vQmod v2.3.0, making it about half the size using the new routes to things.

Code: Select all

<?xml version="1.0"?>
<modification>
<id><![CDATA[remove WishList Links - frontend to start]]></id>
   <version><![CDATA[3.0 for typical OpenCart since opencart]]></version>
   <vqmver><![CDATA[2.3.0 - uses multi-path and * search]]></vqmver>
<author><![CDATA[William Jay - williamjay@repairman.com]]></author>

<file name="catalog/view/theme/*/template/common/header.tpl">
   <operation error="log" info="remove WishList from Header Menu">
      <search position="replace" trim ="true"><![CDATA[<a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a>]]></search>
      <add><![CDATA[<!--removed by design, vQmod remove_WishList_Links ~Line 10-->]]></add>
   </operation>
</file>

<file path="catalog/view/theme/*/template/*/" name="footer.tpl,account.tpl">
   <operation error="log" info="remove WishList from Footer Menu and Account Panel">
      <search position="replace" trim ="true"><![CDATA[<li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>]]></search>
      <add><![CDATA[<!--removed by design, vQmod remove_WishList_Links, ~Line 17-->]]></add>
   </operation>
</file>

<file name="catalog/view/theme/*/template/product/product.tpl">
   <operation error="log" info="remove WishList from Product View leave Compare">
      <search position="replace" trim ="true"><![CDATA[<div><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br />]]></search>
      <add><![CDATA[<div class="wishlist" style="display:none;"><!--removed by design, vQmod remove_WishList, ~Line 24--><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a></div><div class="compare">]]></add>
   </operation>
</file>

<file path="catalog/view/theme/*/template/product/" name="category.tpl,manufacturer_info.tpl,search.tpl,special.tpl">
   <operation error="log" info="remove WishList make div disappear from many places in 4 files">
      <search position="replace" trim ="true"><![CDATA[<div class="wishlist">]]></search>
      <add><![CDATA[<div class="wishlist" style="display:none;"><!--removed by design, vQmod remove_WishList, ~Line 31-->]]></add>
   </operation>
</file>

</modification>


-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by williamjay » Mon Mar 11, 2013 2:28 pm

Working on this also gives the opportunity to solve the original problem in 20 lines of code instead of 60 AND work on the incomplete css code. It lead to doing it another way! Two part repair, firstly add the code into an xml file and save it in the place,

Code: Select all


<modification>
<id><![CDATA[fix wishlist - compare by fix css DIV class]]></id>
   <version><![CDATA[3.5 css dev]]></version>
   <vqmver><![CDATA[2.1 - and edit stylesheet.css to use]]></vqmver>
<author><![CDATA[William Jay - williamjay@repairman.com]]></author>

<file name="catalog/view/theme/*/template/product/product.tpl">
   <operation error="log" info="fix broken css, forgotten members reunited - 2013 code clean-up all templates set .compare and .wishlist to display:none or other modification">
      <search position="replace" trim ="true" offset="1"><![CDATA[<div><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br />]]></search>
      <add><![CDATA[<div><span class="wishlist"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a></span><!--altered by design- vQmod fix wishlist - compare by fix css DIV class~Line 10-->
      <span class="compare"><a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span></div>]]></add>
   </operation>
</file>

<file name="catalog/view/theme/*/template/common/header.tpl">
   <operation error="log" info="remove WishList from Header Menu">
      <search position="replace" trim ="true"><![CDATA[<a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a>]]></search>
      <add><![CDATA[<span class="wishlist"><a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a>
      </span><!--removed by design, vQmod fix wishlist - compare by fix css DIV class~Line 19-->
         ]]></add>
   </operation>
</file>

<file path="catalog/view/theme/*/template/*/" name="footer.tpl,account.tpl">
   <operation error="log" info="remove WishList from Footer Menu and Account Panel">
      <search position="replace" trim ="true"><![CDATA[<li><a href="<?php echo $wishlist; ?>">]]></search>
      <add><![CDATA[<li class="wishlist"><a href="<?php echo $wishlist; ?>">
      <!--removed by design, vQmod fix wishlist - compare by fix css DIV class~Line 28-->]]></add>
   </operation>
</file>

</modification>

Check that the site is operating normally, any VQmod or other errors resolved, then

Open your main stylesheet.css and add the off On Off global switches for display of the features.

Go to the bottom of the file and add these lines:

Code: Select all

.wishlist {
	display: none;
}
.compare {
	display: none;
}
This way will probably make more sense immediately to site designers and it's very low overhead for global change. Let me know if it works for you, or not, I like puzzles.

-- - thanks for the opportunity to participate in y(our) ongoing success - --


User avatar
New member

Posts

Joined
Sun Apr 29, 2012 5:41 am

Post by carpin » Mon Apr 01, 2013 4:27 am

williamjay, thanks for the mod, I used the modification on 1.5.4.1.

New member

Posts

Joined
Sun May 09, 2010 8:10 am
Location - Netherlands
Who is online

Users browsing this forum: No registered users and 47 guests