Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Hikashop integration
Pages: [1]   Go Down
  Print  
Author Topic: Hikashop integration  (Read 2682 times)
0 Members and 1 Guest are viewing this topic.
Ianspeed
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« on: July 07, 2011, 22:22:16 »

Hi, I have implemented Jcomments module on a site running Hikashop, unfortunately the module does not look at the Object_Id but the component group, so I get all the comments from all the categories and products in the module where as I would like to specify the object_id so I get only comments for that page in the module.  Hope this makes sense. 


Many Thanks

Ian
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: July 26, 2011, 06:52:04 »

Do you want to have module which will show comments for certain product?
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Ianspeed
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #2 on: September 01, 2011, 21:44:17 »

Hi, yes, the module shows all comments for all products, just would like the comment in that module for that product page.

Didn't get notification of your reply, sorry for the late reply.
Many Thanks

Ian
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: October 07, 2011, 19:20:47 »

In my mind it would be more correct to create simple module (based on default JComments Latest) which will  look at current page parameters and filter comments...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Ianspeed
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #4 on: October 07, 2011, 19:24:24 »

Hia,

Not sure how to do that, I have the comments module, but can't see a way to filter.
Would this be using the current module I'm using form Jcomments?

Thanks

Ian
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #5 on: October 07, 2011, 19:36:52 »

Ok, I understand you. Lets go by esy way.

1. Open /modules/mod_jcomments/mod_jcomments.php
2. Find code (line 88):

Code: (php)
} else {

$groups = explode( ',', $object_group );
3. Insert before:
Code: (php)
} else if ($object_group == 'com_hikashop') {
$option = JRequest::getCmd('option');

$productId = 0;

if ($option == 'com_hikashop') {

$ctrl = JRequest::getVar('ctrl');
if (JRequest::getVar('ctrl') == 'product') {
$productId = JRequest::getVar('cid');
}
}

$query = "SELECT cc.id, cc.userid, cc.comment, cc.name, cc.username, cc.email, cc.date, cc.object_id, cc.object_group, '' as avatar "
. "\n FROM #__jcomments AS cc"
. "\n WHERE cc.published = " . ($unpublished ? '0' : '1')
. "\n   AND cc.object_group = 'com_hikashop'"
. ($productId != 0 ? ("\n   AND cc.object_id = " . (int) $productId) : '')
. (JCommentsMultilingual::isEnabled() ? "\nAND cc.lang = '" . JCommentsMultilingual::getLanguage() . "'" : "")
. "\n ORDER BY " . $orderby
. "\n LIMIT " . intval( $params->get( 'count' ) )
;

I did not tested this but in my mind it should work.

Make this changes, setup module's paramter Source to com_hikeshop (only one value), publish module on some page where Hikeshop present and walk through products. Module will show comments for product now displayed.


Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Ianspeed
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #6 on: October 07, 2011, 20:15:01 »

Nothing seems to appear on the right module at product page level....

Have I set the code right?

Thanks

Ian
« Last Edit: October 07, 2011, 20:16:51 by smart » Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #7 on: October 07, 2011, 20:18:27 »

Hm... Download attached file, unpack and replace with exisiting...

* mod_jcomments_unzip.zip (4.38 KB - downloaded 39 times.)
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Ianspeed
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #8 on: October 07, 2011, 20:56:17 »

Hi,

Still nothing happening....  Sad

Sorry...

Ian
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #9 on: October 07, 2011, 21:05:02 »

Could you setup some test site with HikeShop and give me access to it via FTP and Joomla's backend? I've no time to creationg such sandbox and learn how to setup HikeShop but I want to help you.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Hikashop integration
 
Jump to: