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

#   Comments do not show coming from cart (resolved)

##

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 4 months ago -  14 years 4 months ago [\#55267](#55267) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  *[Comments do not show coming from cart (resolved)](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55267 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")* was created by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")*

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

Last edit: 14 years 4 months ago by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

14 years 4 months ago [\#55351](#55351) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Comments do not show when coming from cart](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55351 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")*

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.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 4 months ago [\#55394](#55394) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Comments do not show when coming from cart](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55394 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 4 months ago [\#55431](#55431) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Comments do not show when coming from cart](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55431 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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)
-

14 years 4 months ago [\#55449](#55449) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: Comments do not show when coming from cart](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55449 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")*

Hi,

Thanks for your report. It has been corrected, and will be in the next release.

To fix it:
In HikaShop &gt; Display &gt; Views, Edit the view "product / show_default.php"
And replace: Code:

$js = ''; $params = null; echo hikashop_getLayout('vote', 'form', $params, $js);

By: Code:

$js = ''; if(isset($this-&gt;element-&gt;main)){ $product_id = $this-&gt;element-&gt;main-&gt;product_id; }else{ $product_id = $this-&gt;element-&gt;product_id; } $this-&gt;params-&gt;set('product_id',$product_id); echo hikashop_getLayout('vote', 'form', $this-&gt;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');

By: Code:

if(!empty($this-&gt;params)){ $hikashop_vote_product_id = $this-&gt;params-&gt;get('product_id'); }

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 4 months ago [\#55451](#55451) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Comments do not show when coming from cart](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55451 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")*

Thank you Xavier.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 4 months ago [\#55458](#55458) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Comments do not show coming from cart](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55458 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")*

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?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 4 months ago [\#55464](#55464) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Comments do not show coming from cart](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55464 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")*

OK. Got it working.

There needs to be a bit more clarification on your instructions.

Change Code:

$js = ''; $params = null; echo hikashop_getLayout('vote', 'form', $params, $js);

to Code:

$js = ''; if(isset($this-&gt;element-&gt;main)){ $product_id = $this-&gt;element-&gt;main-&gt;product_id; }else{ $product_id = $this-&gt;element-&gt;product_id; } $this-&gt;params-&gt;set('product_id',$product_id); echo hikashop_getLayout('vote', 'form', $this-&gt;params, $js);

and Code:

$js = ''; $params = null; echo hikashop_getLayout('vote', 'listing', $params, $js);

to Code:

$js = ''; if(isset($this-&gt;element-&gt;main)){ $product_id = $this-&gt;element-&gt;main-&gt;product_id; }else{ $product_id = $this-&gt;element-&gt;product_id; } $this-&gt;params-&gt;set('product_id',$product_id); echo hikashop_getLayout('vote', 'listing', $this-&gt;params, $js);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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)
-

14 years 4 months ago [\#55469](#55469) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: Comments do not show coming from cart](/forum/3-bug-report/55267-comments-do-not-show-coming-from-cart-resolved#55469 "In the front-end: 1) View an item - comments are showing OK 2) Add item to to the cart using &quot;Add to cart&quot; 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")*

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');"

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81NTI2Ny1jb21tZW50cy1kby1ub3Qtc2hvdy1jb21pbmctZnJvbS1jYXJ0LXJlc29sdmVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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.068 seconds

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