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

#   Hikashop comment connect with Jomsocial's Karma?

##

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

Less More

- Posts: 175
- Thank you received: 0
-
-

12 years 8 months ago [\#148049](#148049) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  *[Hikashop comment connect with Jomsocial's Karma?](/forum/42-vote/866600-hikashop-comment-connect-with-jomsocials-karma#148049 "hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks")* was created by *[veeco](/forum/user/18501-veeco "View veeco's Profile")*

hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 8 months ago [\#148079](#148079) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Hikashop comment connect with Jomsocial's Karma?](/forum/42-vote/866600-hikashop-comment-connect-with-jomsocials-karma#148079 "hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks")*

Hi,

You can create a plugin based on the trigger "onBeforeVoteCreate()" or "onBeforeVoteUpdate()" and in this function you have to add code to change the karma value in jomsocial.

Here is some documentation:
[ hikashop.com/support/support/documentati...r-documentation.html](https://hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html)

The following user(s) said Thank You: [veeco](/forum/user/18501-veeco "View veeco's Profile")

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

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

Less More

- Posts: 175
- Thank you received: 0
-
-

12 years 8 months ago [\#148208](#148208) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  Replied by *[veeco](/forum/user/18501-veeco "View veeco's Profile")* on topic *[Hikashop comment connect with Jomsocial's Karma?](/forum/42-vote/866600-hikashop-comment-connect-with-jomsocials-karma#148208 "hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks")*

hi, thanks for your reply

i tried to create a plugin by copying one of the plugins [i copied hikashop history and edited some data]

here is my code
Code:

&lt;?php defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php class plgHikashopJomsocial extends JPlugin { function plgHikashopJomsocial(&amp;$subject, $config){ parent::__construct($subject, $config); } function onAfterVoteCreate(&amp;$element){ /* my Function */ } }

the php is loaded [i tried to die() and it worked]
however the onAfterVoteCreate isn't triggered after i voted
did i do something wrong?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 8 months ago [\#148262](#148262) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Hikashop comment connect with Jomsocial's Karma?](/forum/42-vote/866600-hikashop-comment-connect-with-jomsocials-karma#148262 "hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks")*

Hi,

In the XML file, in which group have you put this plugin ?
That should be "hikashop" or "system".

> &lt;extension type="plugin" version="2.5" method="upgrade" group="hikashop"&gt;

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

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

Less More

- Posts: 175
- Thank you received: 0
-
-

12 years 8 months ago [\#148482](#148482) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  Replied by *[veeco](/forum/user/18501-veeco "View veeco's Profile")* on topic *[Hikashop comment connect with Jomsocial's Karma?](/forum/42-vote/866600-hikashop-comment-connect-with-jomsocials-karma#148482 "hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks")*

yes, i've set it to hikashop and it still isn't triggered
my function inside it is just a simple database query to update the user's table

could you provide me with a simple example plugin php and xml, maybe with simple query viewing some username or something

thanks

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 8 months ago [\#148536](#148536) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Hikashop comment connect with Jomsocial's Karma?](/forum/42-vote/866600-hikashop-comment-connect-with-jomsocials-karma#148536 "hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks")*

Hi,

My mistake, you have to use the function: "onAfterVoteUpdate($element)".
The other one is not triggered.

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

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

Less More

- Posts: 175
- Thank you received: 0
-
-

12 years 8 months ago [\#148744](#148744) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  Replied by *[veeco](/forum/user/18501-veeco "View veeco's Profile")* on topic *[Hikashop comment connect with Jomsocial's Karma?](/forum/42-vote/866600-hikashop-comment-connect-with-jomsocials-karma#148744 "hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks")*

hello, is this what you mean?
Code:

&lt;?php defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php class plgHikashopJomsocial_Karma extends JPlugin { function plgHikashopJomsocial_Karma(&amp;$subject, $config){ parent::__construct($subject, $config); } function onAfterVoteUpdate($element){ die(); } }

because it's not triggered when i review a product

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 8 months ago [\#148790](#148790) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Hikashop comment connect with Jomsocial's Karma?](/forum/42-vote/866600-hikashop-comment-connect-with-jomsocials-karma#148790 "hello, is there anyway to make that every time user vote/comment a product, he gains karma on the jomsocial's profile? thanks")*

Thanks to try with that plugin.
Tested and working.

The output can be seen thanks to your browser console in the network tab.
This will not be displayed on the page as it's a plugin.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODY2NjAwLWhpa2FzaG9wLWNvbW1lbnQtY29ubmVjdC13aXRoLWpvbXNvY2lhbC1zLWthcm1hP3RtcGw9bWFya2Rvd24=) 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.072 seconds

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