Jcomment form for each product disappears.
- eMicroMart
-
Topic Author
- Offline
Less
More
11 years 10 months ago - 11 years 10 months ago #179845
by eMicroMart
Jcomment form for each product disappears. was created by eMicroMart
-- url of the page with the problem -- :
www.thaioptics.com
-- HikaShop version -- : Business 2.1.3
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : Firefox 33.0
After I upgraded my Joomla 3.1.5 -> 3.3.6, my jcomment form for each product just disappears !
I have no idea what happened
so I try to debug the Joomla 3.1.5 comparing to Joomla 3.3.6
I found that the problem comes from components\com_hikashop\views\product\tmpl\show.php
Please note that the -> sign indicates the flow of execution.
I found that Joomla 3.1.5 return the right values of $product_id and $product_name while Joomla 3.3.6 returns $product_id = NULL and $product_name = NULL
I think this is the root cause. How do I fix it ? or please correct me if my investigation is wrong. Thank you
( Now, I cannot upgrade to the latest Hikashop Business Version
)
-- HikaShop version -- : Business 2.1.3
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : Firefox 33.0
After I upgraded my Joomla 3.1.5 -> 3.3.6, my jcomment form for each product just disappears !
I have no idea what happened
I found that the problem comes from components\com_hikashop\views\product\tmpl\show.php
Please note that the -> sign indicates the flow of execution.
Code:
<div class="hikashop_external_comments" id="hikashop_external_comments" style="clear:both">
<?php
->$config = & hikashop_config();
->if ($config->get('comments_feature') == 'jcomments') {
->$comments = HIKASHOP_ROOT . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
->if (file_exists($comments)) {
->require_once ($comments);
->if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name)){
$product_id = $this->element->main->product_id;
$product_name = $this->element->main->product_name;
}else{
->$product_id = $this->element->product_id;
->$product_name = $this->element->product_name;
}
->echo JComments::showComments($product_id, 'com_hikashop', $product_name);
}
}
I found that Joomla 3.1.5 return the right values of $product_id and $product_name while Joomla 3.3.6 returns $product_id = NULL and $product_name = NULL
I think this is the root cause. How do I fix it ? or please correct me if my investigation is wrong. Thank you
( Now, I cannot upgrade to the latest Hikashop Business Version
Last edit: 11 years 10 months ago by eMicroMart.
Please Log in or Create an account to join the conversation.
- eMicroMart
-
Topic Author
- Offline
11 years 10 months ago - 11 years 10 months ago #179848
by eMicroMart
Replied by eMicroMart on topic Jcomment form for each product disappears.
Anyway, why is the coding area just a plain text ? It should be highlighted text.
I have tried code=php but it doesn't work.
I have tried code=php but it doesn't work.
Last edit: 11 years 10 months ago by eMicroMart.
Please Log in or Create an account to join the conversation.
11 years 10 months ago #179944
by Xavier
Replied by Xavier on topic Jcomment form for each product disappears.
Hi,
Please try to replace:
By:
Please try to replace:
Code:
$this->params->set('show_price_weight', 0);
?>
<div class="hikashop_submodules" id="hikashop_submodules" style="clear:both">
<?php
if (!empty ($this->modules) && is_array($this->modules)) {
jimport('joomla.application.module.helper');
foreach ($this->modules as $module) {
echo JModuleHelper :: renderModule($module);
}
}
?>
</div>
<div class="hikashop_external_comments" id="hikashop_external_comments" style="clear:both">
<?php
$config = & hikashop_config();
if ($config->get('comments_feature') == 'jcomments') {
$comments = HIKASHOP_ROOT . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
if (file_exists($comments)) {
require_once ($comments);
if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name)){
$product_id = $this->element->main->product_id;
$product_name = $this->element->main->product_name;
}else{
$product_id = $this->element->product_id;
$product_name = $this->element->product_name;
}
echo JComments::showComments($product_id, 'com_hikashop', $product_name);
}
}
elseif ($config->get('comments_feature') == 'jomcomment') {
$comments = HIKASHOP_ROOT . 'plugins' . DS . 'content' . DS . 'jom_comment_bot.php';
if (file_exists($comments)) {
require_once ($comments);
if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name))
$product_id = $this->element->main->product_id;
else
$product_id = $this->element->product_id;
echo jomcomment($product_id, 'com_hikashop');
}
}
?>
</div><?php
}
?>
</div>
Code:
$this->params->set('show_price_weight', 0);
$this->product = $this->element;
?>
<div class="hikashop_submodules" id="hikashop_submodules" style="clear:both">
<?php
if (!empty ($this->modules) && is_array($this->modules)) {
jimport('joomla.application.module.helper');
foreach ($this->modules as $module) {
echo JModuleHelper :: renderModule($module);
}
}
?>
</div>
<div class="hikashop_external_comments" id="hikashop_external_comments" style="clear:both">
<?php
$config = & hikashop_config();
if ($config->get('comments_feature') == 'jcomments') {
$comments = HIKASHOP_ROOT . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
if (file_exists($comments)) {
require_once ($comments);
if (hikashop_getCID('product_id')!=$this->product->product_id && isset ($this->product->main->product_name)){
$product_id = $this->product->main->product_id;
$product_name = $this->product->main->product_name;
}else{
$product_id = $this->product->product_id;
$product_name = $this->product->product_name;
}
echo JComments::showComments($product_id, 'com_hikashop', $product_name);
}
}
elseif ($config->get('comments_feature') == 'jomcomment') {
$comments = HIKASHOP_ROOT . 'plugins' . DS . 'content' . DS . 'jom_comment_bot.php';
if (file_exists($comments)) {
require_once ($comments);
if (hikashop_getCID('product_id')!=$this->product->product_id && isset ($this->product->main->product_name))
$product_id = $this->product->main->product_id;
else
$product_id = $this->product->product_id;
echo jomcomment($product_id, 'com_hikashop');
}
}
?>
</div><?php
}
?>
</div>
The following user(s) said Thank You: eMicroMart
Please Log in or Create an account to join the conversation.
- eMicroMart
-
Topic Author
- Offline
11 years 10 months ago #180051
by eMicroMart
Replied by eMicroMart on topic Jcomment form for each product disappears.
:woohoo: Wow ... it works ! Thank you so much :woohoo:
Please Log in or Create an account to join the conversation.
- eMicroMart
-
Topic Author
- Offline
11 years 9 months ago #183239
by eMicroMart
Replied by eMicroMart on topic Jcomment form for each product disappears.
-- url of the page with the problem -- :
www.thaioptics.com
-- HikaShop version -- : Business 2.1.3
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : Firefox 33.0
Hello,
I really appreciate your help. Your solution works great to bring the Jcomment form back. However, I have found 2 more problems.
I enable Jcomment throughout my website ( under joomla articles and under products in Hikashop)
The Jcomment forms under all Joomla articles work perfectly. After users had submitted their comments, the Jcomment forms refreshed itself and displayed the comments immediately. After that, I got an email notification for all comments.
Unfortunately, the Jcomment forms under all Hikashop products have a weird behavior. It fails to refresh itself, so users cannot see their comments immediately. Users have to reload the page to see their comments and, more importantly, I don't get any Jcomment email notification, so I don't know my customers ask me a question.
Please feel free to test at www.thaioptics.com
Best regards and Thank you very much
-- HikaShop version -- : Business 2.1.3
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : Firefox 33.0
Hello,
I really appreciate your help. Your solution works great to bring the Jcomment form back. However, I have found 2 more problems.
I enable Jcomment throughout my website ( under joomla articles and under products in Hikashop)
The Jcomment forms under all Joomla articles work perfectly. After users had submitted their comments, the Jcomment forms refreshed itself and displayed the comments immediately. After that, I got an email notification for all comments.
Unfortunately, the Jcomment forms under all Hikashop products have a weird behavior. It fails to refresh itself, so users cannot see their comments immediately. Users have to reload the page to see their comments and, more importantly, I don't get any Jcomment email notification, so I don't know my customers ask me a question.
Please feel free to test at www.thaioptics.com
Best regards and Thank you very much
Please Log in or Create an account to join the conversation.
11 years 9 months ago #183262
by nicolas
Replied by nicolas on topic Jcomment form for each product disappears.
Hi,
The code of Xavier just loads the Jcomment interface under the product page. It's up to Jcomment itself to refresh itself if necessary and to send the email if necessary. Since we don't know how Jcomment works, we cannot help on these issues.
I would recommend to contact the Jcomment support for help on these questions.
The code of Xavier just loads the Jcomment interface under the product page. It's up to Jcomment itself to refresh itself if necessary and to send the email if necessary. Since we don't know how Jcomment works, we cannot help on these issues.
I would recommend to contact the Jcomment support for help on these questions.
Please Log in or Create an account to join the conversation.
Time to create page: 0.203 seconds