Comments do not show coming from cart (resolved)
14 years 3 months ago - 14 years 3 months ago #55267
by esotechie
Comments do not show coming from cart (resolved) was created by esotechie
In the front-end:
1) View an item - comments are showing OK
2) Add item to to the cart using "Add to cart" button
3) In cart click on the name of the item to return to the item page
Now the item shows with a different URL and the comments are not showing.
Search Engine Friendly URLs is ON
1) View an item - comments are showing OK
2) Add item to to the cart using "Add to cart" button
3) In cart click on the name of the item to return to the item page
Now the item shows with a different URL and the comments are not showing.
Search Engine Friendly URLs is ON
Last edit: 14 years 3 months ago by esotechie.
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55351
by nicolas
Replied by nicolas on topic Re: Comments do not show when coming from cart
Hi,
What commenting system are you using ?
Could you give a link so that we can reproduce the problem ?
I tried on our demo website and didn't see the problem.
What commenting system are you using ?
Could you give a link so that we can reproduce the problem ?
I tried on our demo website and didn't see the problem.
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55394
by esotechie
Replied by esotechie on topic Re: Comments do not show when coming from cart
Thanks for the reply Nicolas. On your site you do not have Search Engine Friendly URLs turned on. Does it make a difference with it on?
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55431
by esotechie
Replied by esotechie on topic Re: Comments do not show when coming from cart
I've done a little more testing and it does not happen on products without variants. It only occurs if the product has variants.
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55449
by Xavier
Replied by Xavier on topic Re: Comments do not show when coming from cart
Hi,
Thanks for your report. It has been corrected, and will be in the next release.
To fix it:
In HikaShop > Display > Views, Edit the view "product / show_default.php"
And replace:
By:
In the divs: "hikashop_product_vote_listing" and "hikashop_product_vote_form"
And edit the file:
YourSite\components\com_hikashop\views\vote\view.html.php
And replace:
By:
Thanks for your report. It has been corrected, and will be in the next release.
To fix it:
In HikaShop > Display > Views, Edit the view "product / show_default.php"
And replace:
Code:
$js = '';
$params = null;
echo hikashop_getLayout('vote', 'form', $params, $js);
Code:
$js = '';
if(isset($this->element->main)){
$product_id = $this->element->main->product_id;
}else{
$product_id = $this->element->product_id;
}
$this->params->set('product_id',$product_id);
echo hikashop_getLayout('vote', 'form', $this->params, $js);
In the divs: "hikashop_product_vote_listing" and "hikashop_product_vote_form"
And edit the file:
YourSite\components\com_hikashop\views\vote\view.html.php
And replace:
Code:
$hikashop_vote_product_id = hikashop_getCID('product_id');
Code:
if(!empty($this->params)){
$hikashop_vote_product_id = $this->params->get('product_id');
}
The following user(s) said Thank You: esotechie
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55451
by esotechie
Replied by esotechie on topic Re: Comments do not show when coming from cart
Thank you Xavier.
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55458
by esotechie
Replied by esotechie on topic Re: Comments do not show coming from cart
Made the changes now there is no comments at all for any product.
Also there are two occurrences of "$hikashop_vote_product_id = hikashop_getCID('product_id');". Do i change both?
Also there are two occurrences of "$hikashop_vote_product_id = hikashop_getCID('product_id');". Do i change both?
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55464
by esotechie
Replied by esotechie on topic Re: Comments do not show coming from cart
OK. Got it working.
There needs to be a bit more clarification on your instructions.
Change
to
and
to
There needs to be a bit more clarification on your instructions.
Change
Code:
$js = '';
$params = null;
echo hikashop_getLayout('vote', 'form', $params, $js);
Code:
$js = '';
if(isset($this->element->main)){
$product_id = $this->element->main->product_id;
}else{
$product_id = $this->element->product_id;
}
$this->params->set('product_id',$product_id);
echo hikashop_getLayout('vote', 'form', $this->params, $js);
and
Code:
$js = '';
$params = null;
echo hikashop_getLayout('vote', 'listing', $params, $js);
Code:
$js = '';
if(isset($this->element->main)){
$product_id = $this->element->main->product_id;
}else{
$product_id = $this->element->product_id;
}
$this->params->set('product_id',$product_id);
echo hikashop_getLayout('vote', 'listing', $this->params, $js);
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55469
by Xavier
Replied by Xavier on topic Re: Comments do not show coming from cart
Yes, I forgot to specify the two different types of layout.
And you have to change the two different occurrences of: "$hikashop_vote_product_id = hikashop_getCID('product_id');"
And you have to change the two different occurrences of: "$hikashop_vote_product_id = hikashop_getCID('product_id');"
The following user(s) said Thank You: esotechie
Please Log in or Create an account to join the conversation.
Time to create page: 0.250 seconds