[Skip to main content](#vessel-content)

#   Changing the Wishlist button status?

##

- **[AaronMorrison](/forum/user/7440-aaronmorrison "View AaronMorrison's Profile")**
- [![AaronMorrison's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7440-aaronmorrison "View AaronMorrison's Profile") Topic Author
- [ Offline](/forum/user/7440-aaronmorrison)

Less More

- Posts: 2
- Thank you received: 0
-
-

7 years 5 months ago [\#306454](#306454) by [AaronMorrison](/forum/user/7440-aaronmorrison "View AaronMorrison's Profile")  *[Changing the Wishlist button status?](/forum/41-wishlist/897446-changing-the-wishlist-button-status#306454 "-- HikaShop version -- : 4.0.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 5.6.40    cl.ly/70ee6fda395d  - image of the button...  On the page I gave, there is a little grey heart that acts as wishlist button. But this question applies to all wishlist buttons.  Is there a way for the wishlist button to change status (or css class) depending on whether the user has added that item to their wishlist? We want to let the user know they already have it in their wishlist.  Thanks!")* was created by *[AaronMorrison](/forum/user/7440-aaronmorrison "View AaronMorrison's Profile")*

-- HikaShop version -- : 4.0.0
-- Joomla version -- : 3.8.12
-- PHP version -- : 5.6.40

[ cl.ly/70ee6fda395d](https://cl.ly/70ee6fda395d) - image of the button...

On the page I gave, there is a little grey heart that acts as wishlist button. But this question applies to all wishlist buttons.

Is there a way for the wishlist button to change status (or css class) depending on whether the user has added that item to their wishlist? We want to let the user know they already have it in their wishlist.

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3dpc2hsaXN0Lzg5NzQ0Ni1jaGFuZ2luZy10aGUtd2lzaGxpc3QtYnV0dG9uLXN0YXR1cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14292
-
-

7 years 5 months ago [\#306467](#306467) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Changing the Wishlist button status?](/forum/41-wishlist/897446-changing-the-wishlist-button-status#306467 "-- HikaShop version -- : 4.0.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 5.6.40    cl.ly/70ee6fda395d  - image of the button...  On the page I gave, there is a little grey heart that acts as wishlist button. But this question applies to all wishlist buttons.  Is there a way for the wishlist button to change status (or css class) depending on whether the user has added that item to their wishlist? We want to let the user know they already have it in their wishlist.  Thanks!")*

Hi,

There is no option for that.
As you can have quantity for products in wishlists, clicking several times on the wishlist button will increase the quantity of the product in the wishlist.

Now you could add such class with a bit of customization on the view file displaying the wishlist button.
You can activate the "Display view files" setting of the HikaShop configuration to know which view file is used there.
Then, in the view, you can load the cart and loop through the products in it to see if one match with the current product. It should be some simple code like that: Code:

$cartClass = hikashop_get('class.cart'); $cart_id = $cartClass-&gt;getCurrentCartId('cart'); $cart = $cartClass-&gt;getFullCart($cart_id); foreach($cart-&gt;products as $product) { if($product-&gt;product_id == $this-&gt;row-&gt;product_id) { echo 'product already in the cart'; } }

To do the same for the wishlist instead of the cart, just replace 'cart' by 'wishlist' in the getCurrentCartId function call.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3dpc2hsaXN0Lzg5NzQ0Ni1jaGFuZ2luZy10aGUtd2lzaGxpc3QtYnV0dG9uLXN0YXR1cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.063 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
