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

#   Hikashop next product button

##

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

Less More

- Posts: 102
- Thank you received: 3
-
-
-
-

10 years 3 months ago -  10 years 3 months ago [\#246636](#246636) by [Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")  *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246636 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")* was created by *[Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.6.0

Hello,

Is anyone make links between first and last product?

Now it's works like: *product 1 &gt; product 2 &gt; product 3*
It would be good if: *product 1 &gt; product 2 &gt; product 3 &gt; product 1*

Circle linked products for better SEO)

Thnx.

Last edit: 10 years 3 months ago by [Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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: 86358
- Thank you received: 14293
-
-

10 years 3 months ago [\#246667](#246667) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246667 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")*

Hi,

Thank you for your feedback. That's a good idea.
You can add the code: Code:

if($config-&gt;get('circle_around_for_shortcuts', 1)){ if(empty($links-&gt;next) &amp;&amp; !empty($links-&gt;previous)){ $id_next = first($articles); $elt = $productClass-&gt;get($id_next); $productClass-&gt;addAlias($elt); $links-&gt;next = hikashop_completeLink('product&amp;task=show&amp;cid='.(int)$id_next.'&amp;name='.$elt-&gt;alias.'&amp;'.$pathway.$url_itemid); $links-&gt;next_product = $elt; } if(empty($links-&gt;previous) &amp;&amp; !empty($links-&gt;next)){ $id_previous = end($articles); $elt = $productClass-&gt;get($id_previous); $productClass-&gt;addAlias($elt); $links-&gt;previous = hikashop_completeLink('product&amp;task=show&amp;cid='.(int)$id_previous.'&amp;name='.$elt-&gt;alias.'&amp;'.$pathway.$url_itemid); $links-&gt;previous_product = $elt; } }

after the code: Code:

if(isset($articles[$n])) { $id_next = $articles[$n]; $elt = $productClass-&gt;get($id_next); $productClass-&gt;addAlias($elt); $links-&gt;next = hikashop_completeLink('product&amp;task=show&amp;cid='.(int)$id_next.'&amp;name='.$elt-&gt;alias.'&amp;'.$pathway.$url_itemid); $links-&gt;next_product = $elt; } break; }

in the file components/com_hikashop/views/product/view.html.php and that should do it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 102
- Thank you received: 3
-
-
-
-

10 years 3 months ago [\#246715](#246715) by [Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")  Replied by *[Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")* on topic *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246715 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")*

Thank you very much for you attention.

Something wrong. It doesn't work((

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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: 86358
- Thank you received: 14293
-
-

10 years 3 months ago [\#246735](#246735) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246735 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")*

Hi,

Change the line:
$id_next = first($articles);
to:
$id_next = reset($articles);
in the code I gave and it will work. I've tested it myself.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 102
- Thank you received: 3
-
-
-
-

10 years 3 months ago [\#246741](#246741) by [Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")  Replied by *[Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")* on topic *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246741 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")*

Hello,

I don't know why)) My view.html file in attachment

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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: 86358
- Thank you received: 14293
-
-

10 years 3 months ago [\#246743](#246743) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246743 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")*

Hmm, you have a different version of the code than I do.
You need to add a } before the code and remove one after so that the new code goes outside of the foreach loop.
Like that: Code:

foreach($articles as $k =&gt; $article){ if($article != $element-&gt;product_id &amp;&amp; $article != $element-&gt;product_parent_id) continue; $links-&gt;path = JURI::root() . 'media/com_hikashop/images/icons/'; $pathway = ''; if(isset($category_pathway)) $pathway = $pathway_sef_name.'='.$category_pathway; if($k != 0) { $p = $k - 1; $id_previous = $articles[$p]; $elt = $productClass-&gt;get($id_previous); $productClass-&gt;addAlias($elt); $links-&gt;previous = hikashop_completeLink('product&amp;task=show&amp;cid='.(int)$id_previous.'&amp;name='.$elt-&gt;alias.'&amp;'.$pathway.$url_itemid); $links-&gt;previous_product = $elt; } $n = $k; while(isset($articles[$n]) &amp;&amp; ($articles[$n] == $element-&gt;product_id &#124;&#124; $articles[$n] == $element-&gt;product_parent_id)) { $n++; } if(isset($articles[$n])) { $id_next = $articles[$n]; $elt = $productClass-&gt;get($id_next); $productClass-&gt;addAlias($elt); $links-&gt;next = hikashop_completeLink('product&amp;task=show&amp;cid='.(int)$id_next.'&amp;name='.$elt-&gt;alias.'&amp;'.$pathway.$url_itemid); $links-&gt;next_product = $elt; } break; } if($config-&gt;get('circle_around_for_shortcuts', 1)){ if(empty($links-&gt;next) &amp;&amp; !empty($links-&gt;previous)){ $id_next = reset($articles); $elt = $productClass-&gt;get($id_next); $productClass-&gt;addAlias($elt); $links-&gt;next = hikashop_completeLink('product&amp;task=show&amp;cid='.(int)$id_next.'&amp;name='.$elt-&gt;alias.'&amp;'.$pathway.$url_itemid); $links-&gt;next_product = $elt; } if(empty($links-&gt;previous) &amp;&amp; !empty($links-&gt;next)){ $id_previous = end($articles); $elt = $productClass-&gt;get($id_previous); $productClass-&gt;addAlias($elt); $links-&gt;previous = hikashop_completeLink('product&amp;task=show&amp;cid='.(int)$id_previous.'&amp;name='.$elt-&gt;alias.'&amp;'.$pathway.$url_itemid); $links-&gt;previous_product = $elt; } }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 102
- Thank you received: 3
-
-
-
-

10 years 3 months ago [\#246787](#246787) by [Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")  Replied by *[Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")* on topic *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246787 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")*

Thank you very much. It works well!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile")
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

10 years 3 months ago [\#246791](#246791) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246791 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")*

Hi,

Will this be added to hikashop it self by default? As this is kinda hack....

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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: 86358
- Thank you received: 14293
-
-

10 years 3 months ago [\#246809](#246809) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop next product button](/forum/26-product-category-display/885816-hikashop-next-product-button#246809 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.6.0  Hello,  Is anyone make links between first and last product?  Now it's works like: product 1 &gt; product 2 &gt; product 3 It would be good if: product 1 &gt; product 2 &gt; product 3 &gt; product 1   Circle linked products for better SEO)  Thnx.")*

Yes, it will be added for the next version of HikaShop.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4MTYtaGlrYXNob3AtbmV4dC1wcm9kdWN0LWJ1dHRvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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.089 seconds

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