1
deepak267
Trouble shooting "Comment module" on kshop
  • 2009/12/19 22:29

  • deepak267

  • Quite a regular

  • Posts: 352

  • Since: 2008/8/15


Hi,

I have customised Kshop module to display products(species) for my website. it works great however when you click on comments. it gives a blank page (with no error on debug window).


you can see the module in action Here.

I have verified the instruction described in this thread.


I will really appreciate if you could help or give me some hint to debug it.


Thanks in advance.

Deepak


2
ghia
Re: Trouble shooting "Comment module" on kshop
  • 2009/12/20 1:39

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Is it version 2.23?
In that version the comments seems to be copied from another module and not yet adapted.
In eg comment_new.php, the SQL should be adapted for the right table and id.

3
deepak267
Re: Trouble shooting "Comment module" on kshop
  • 2009/12/20 10:15

  • deepak267

  • Quite a regular

  • Posts: 352

  • Since: 2008/8/15


Hi Ghia,

thanks for your reply.

My test system is :
-------------------
XOOPS Version - XOOPS 2.3.2
PHP Version - 5.3.0
MySQL Version - 5.0.67-community-nt-log
Server API Version - apache2handler
OS Version - WINNT

My production (shared hosting):
------------------------------
XOOPS Version - XOOPS 2.3.1
PHP Version - 5.2.8
MySQL Version - 5.0.67.d7-ourdelta-log
Server API Version - cgi-fcgi
OS Version - Linux

I have the same problem in both environment.

Do you know what need to added to fix the problem? I am fairly new to XOOPS but can give it a try...


Deepak

4
ghia
Re: Trouble shooting "Comment module" on kshop
  • 2009/12/20 10:34

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Kshop module version?

5
deepak267
Re: Trouble shooting "Comment module" on kshop
  • 2009/12/20 11:01

  • deepak267

  • Quite a regular

  • Posts: 352

  • Since: 2008/8/15


kshop v 2.23

is there a newer version available?

6
ghia
Re: Trouble shooting "Comment module" on kshop
  • 2009/12/20 11:21

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


No, AFAIK as I know this is the last one. And also literally, because the project seems abandoned.
A pity, I liked it as a lightweight shop, without no fuss.
Oledrion is fully fledged, but also a very large module.

The problem seems in comment_new.php
include '../../mainfile.php';
$com_itemid = isset($HTTP_GET_VARS['com_itemid']) ? intval($HTTP_GET_VARS['com_itemid']) : 0;
if (
$com_itemid 0) {
    
// Get link title
    
$sql "SELECT title FROM " $xoopsDB->prefix('mylinks_links') . " WHERE lid=" $com_itemid "";
    
$result $xoopsDB->query($sql);
    
$row $xoopsDB->fetchArray($result);
    
$com_replytitle $row['title'];
    include 
XOOPS_ROOT_PATH.'/include/comment_new.php';
}

It seems to be copied from a link module. The table related things (mylinks_links, lid, title) should be changed to the table as used for displaying items.

7
deepak267
Re: Trouble shooting "Comment module" on kshop
  • 2009/12/30 23:19

  • deepak267

  • Quite a regular

  • Posts: 352

  • Since: 2008/8/15


Hi Ghia,

Thanks a lot for your help. After wasting sometime I realised that the fix was really simple.

I have two changes:

1. $HTTP_GET_VARS to be replaced by $_GET
2. The sql to retrieve the comment title (in my case I replaced the title by name of the product).

The revised codes is as follows:

Quote:

include '../../mainfile.php';
$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
if ($com_itemid > 0) {
// Get link title
$sql = "SELECT p_name FROM " . $xoopsDB->prefix('kshop_products') . " WHERE p_id=" . $com_itemid . "";
$result = $xoopsDB->query($sql);
$row = $xoopsDB->fetchArray($result);
$com_replytitle = $row['p_name'];
include XOOPS_ROOT_PATH.'/include/comment_new.php';
}
?>


Thanks again for helping me out.

Good Luck

Deepak

Login

Who's Online

82 user(s) are online (51 user(s) are browsing Support Forums)


Members: 0


Guests: 82


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits