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

#   Add vendor to favourite

##

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

Less More

- Posts: 85
- Thank you received: 9
-
-

6 years 5 months ago -  6 years 2 hours ago [\#319705](#319705) by [pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile")  *[Add vendor to favourite](/forum/23-market-how-to/899977-add-vendor-to-favourite#319705 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.1.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.26  Hello,  is it possible to permit to the users registered to add the vendors to their favourites?  Thank you for your support")* was created by *[pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile")*

-- HikaShop version -- : 4.3.0
-- HikaMarket version -- : 3.1.0
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.2.26

Hello,

is it possible to permit to the users registered to add the vendors to their favourites?

Thank you for your support

Last edit: 6 years 2 hours ago by [pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODk5OTc3LWFkZC12ZW5kb3ItdG8tZmF2b3VyaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

6 years 5 months ago [\#319738](#319738) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Add vendor to favourite](/forum/23-market-how-to/899977-add-vendor-to-favourite#319738 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.1.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.26  Hello,  is it possible to permit to the users registered to add the vendors to their favourites?  Thank you for your support")*

Hello,

Can you please provide more details regarding your feature request.
Since there is no possibility to add product or categories to their favorites ; I admit that I don't understand what you're asking exactly.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODk5OTc3LWFkZC12ZW5kb3ItdG8tZmF2b3VyaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 85
- Thank you received: 9
-
-

6 years 5 months ago -  6 years 5 months ago [\#319763](#319763) by [pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile")  Replied by *[pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile")* on topic *[Add vendor to favourite](/forum/23-market-how-to/899977-add-vendor-to-favourite#319763 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.1.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.26  Hello,  is it possible to permit to the users registered to add the vendors to their favourites?  Thank you for your support")*

I mean if it&#96;s possible with Hikmarket to add the vendor to the wish list like for the products. In attach you can see the wish list button (marked in red) of Hikashop for the products.

Thank you for the support

- [ ![WishList.png](/forum/attachment/49517) ](/forum/attachment/49517 "WishList.png") [ ](/forum/attachment/49517?download=1 "WishList.png")

Last edit: 6 years 5 months ago by [pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODk5OTc3LWFkZC12ZW5kb3ItdG8tZmF2b3VyaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

6 years 5 months ago [\#319820](#319820) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Add vendor to favourite](/forum/23-market-how-to/899977-add-vendor-to-favourite#319820 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.1.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.26  Hello,  is it possible to permit to the users registered to add the vendors to their favourites?  Thank you for your support")*

Hello,

The wishlist is exactly like a cart, you can add product into, not vendors.
In the wishlist you can just add products, not categories or vendors ; that's why we really need to understand what is your feature request. For the moment I do have the feeling that it would be an important development, with new database tables, views, etc.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODk5OTc3LWFkZC12ZW5kb3ItdG8tZmF2b3VyaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 85
- Thank you received: 9
-
-

6 years 5 months ago [\#319885](#319885) by [pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile")  Replied by *[pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile")* on topic *[Add vendor to favourite](/forum/23-market-how-to/899977-add-vendor-to-favourite#319885 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.1.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.26  Hello,  is it possible to permit to the users registered to add the vendors to their favourites?  Thank you for your support")*

ok, I try to implement this function with code

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODk5OTc3LWFkZC12ZW5kb3ItdG8tZmF2b3VyaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 85
- Thank you received: 9
-
-

6 years 2 hours ago -  6 years 2 hours ago [\#325468](#325468) by [pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile")  Replied by *[pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile")* on topic *[Add vendor to favourite](/forum/23-market-how-to/899977-add-vendor-to-favourite#325468 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.1.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.26  Hello,  is it possible to permit to the users registered to add the vendors to their favourites?  Thank you for your support")*

I solved with custom code. I added a button in each category that hase the same name of the vendor.

This is the code of the view **HikaShop - category / listing\_img\_title.php**:
Code:

&lt;?php // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db-&gt;getQuery(true); $query-&gt;select('vendor_id'); $query-&gt;from($db-&gt;quoteName('tbuonapp_hikamarket_vendor')); $query-&gt;where('vendor_name = ' . '"' . $this-&gt;row-&gt;category_name . '"'); // Reset the query using our newly populated query object. $db-&gt;setQuery($query); $idVendor = $db-&gt;loadResult(); // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db-&gt;getQuery(true); $query-&gt;select('vendor_alias'); $query-&gt;from($db-&gt;quoteName('tbuonapp_hikamarket_vendor')); $query-&gt;where('vendor_name = ' . '"' . $this-&gt;row-&gt;category_name . '"'); // Reset the query using our newly populated query object. $db-&gt;setQuery($query); $aliasVendor = $db-&gt;loadResult(); ?&gt; &lt;?php if($idVendor != null and $idVendor != ""){ ?&gt; &lt;br&gt; &lt;form method="post"&gt; &lt;div&gt; &lt;?php foreach ($users as $currentUser) { if($currentUser == $user-&gt;username) { $favourite = true; }elseif($favourite != true){ $favourite = false; } } ?&gt; &lt;?php if($favourite){ ?&gt; &lt;input class ='hikabtn hikawishlist' value="Togli dai preferiti" name="&lt;?php echo 'removeFavourite' . $this-&gt;row-&gt;category_id; ?&gt;" type="submit"&gt; &lt;?php }else{ ?&gt; &lt;input class ='hikabtn hikawishlist' value="Aggiungi ai preferiti" name="&lt;?php echo 'favourite' . $this-&gt;row-&gt;category_id; ?&gt;" type="submit"&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;?php if(isset($_POST['removeFavourite' . $this-&gt;row-&gt;category_id])){ for($i = 0; $i &lt; count($users) - 1; $i++) { if($users[$i] != $user-&gt;username) { $stringUsernamesFavourites .= $users[$i] . ";"; } } }elseif(isset($_POST['favourite' . $this-&gt;row-&gt;category_id])){ $stringUsernamesFavourites = $usersFavourites . $user-&gt;username . ";"; } if(isset($_POST['favourite' . $this-&gt;row-&gt;category_id]) or isset($_POST['removeFavourite' . $this-&gt;row-&gt;category_id])){ // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db-&gt;getQuery(true); // Campi da modificare $fields = array( $db-&gt;quoteName('utenti_preferiti') . ' = "' . $stringUsernamesFavourites . '"' ); // Preparazione della query $query-&gt;update($db-&gt;quoteName('tbuonapp_hikashop_category')); $query-&gt;set($fields); $query-&gt;where('category_id = ' . '"' . $this-&gt;row-&gt;category_id . '"'); // Impostazione ed esequzione della query precedentemente impostata $db-&gt;setQuery($query); $db-&gt;execute(); header('Location: https://www.buonapp.ch/ristoranti'); } ?&gt; &lt;/form&gt; &lt;?php } ?&gt;

And after I created a view for the users where they can see the favourites

Last edit: 6 years 2 hours ago by [pagemaster](/forum/user/50033-pagemaster "View pagemaster's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODk5OTc3LWFkZC12ZW5kb3ItdG8tZmF2b3VyaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.103 seconds

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