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

#   Breadcrumb issue when translating with Falang

##

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

10 years 1 month ago [\#250869](#250869) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  *[Breadcrumb issue when translating with Falang](/forum/26-product-category-display/886614-breadcrumb-issue-when-translating-with-falang#250869 "-- url of the page with the problem -- : test server -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.6 -- Browser(s) name and version -- : Any  We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop  Company Name -&gt; Product Line 1 -&gt; SubCategory 1 Company Name -&gt; Product Line 1 -&gt; SubCategory 2  We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2  We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.  We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category&#95;pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.  However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.  So if we are view a product in subcategory 1 the breadcrumb in English is:  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  In Spanish it becomes (obviously translated in Spanish)  Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name  So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.  Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.  Is there something we can change in the settings to resolve this issue(s)? Thanks, J")* was created by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")*

-- url of the page with the problem -- : test server
-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6
-- Browser(s) name and version -- : Any

We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop

Company Name -&gt; Product Line 1 -&gt; SubCategory 1
Company Name -&gt; Product Line 1 -&gt; SubCategory 2

We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2

We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.

We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category_pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.

However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.

So if we are view a product in subcategory 1 the breadcrumb in English is:

Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name

In Spanish it becomes (obviously translated in Spanish)

Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name

So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.

Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal

Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name

but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.

Is there something we can change in the settings to resolve this issue(s)?
Thanks, J

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODY2MTQtYnJlYWRjcnVtYi1pc3N1ZS13aGVuLXRyYW5zbGF0aW5nLXdpdGgtZmFsYW5nP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

10 years 1 month ago [\#250879](#250879) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Breadcrumb issue when translating with Falang](/forum/26-product-category-display/886614-breadcrumb-issue-when-translating-with-falang#250879 "-- url of the page with the problem -- : test server -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.6 -- Browser(s) name and version -- : Any  We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop  Company Name -&gt; Product Line 1 -&gt; SubCategory 1 Company Name -&gt; Product Line 1 -&gt; SubCategory 2  We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2  We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.  We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category&#95;pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.  However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.  So if we are view a product in subcategory 1 the breadcrumb in English is:  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  In Spanish it becomes (obviously translated in Spanish)  Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name  So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.  Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.  Is there something we can change in the settings to resolve this issue(s)? Thanks, J")*

Hi,

Without knowing the links you have and how the menu items are configured in your examples, it will be hard to say much.

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

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

10 years 1 month ago [\#251006](#251006) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Breadcrumb issue when translating with Falang](/forum/26-product-category-display/886614-breadcrumb-issue-when-translating-with-falang#251006 "-- url of the page with the problem -- : test server -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.6 -- Browser(s) name and version -- : Any  We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop  Company Name -&gt; Product Line 1 -&gt; SubCategory 1 Company Name -&gt; Product Line 1 -&gt; SubCategory 2  We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2  We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.  We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category&#95;pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.  However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.  So if we are view a product in subcategory 1 the breadcrumb in English is:  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  In Spanish it becomes (obviously translated in Spanish)  Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name  So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.  Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.  Is there something we can change in the settings to resolve this issue(s)? Thanks, J")*

We'll set Simplified Breadcrumbs to YES the NO and look at what data is called scroll through the products in each case and see if we can find a way of setting simplified Breadcrumbs to YES and just viewing products in the same category and the we'll report back, with screenshots and other info as necessary.

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

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

10 years 6 days ago [\#254955](#254955) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Breadcrumb issue when translating with Falang](/forum/26-product-category-display/886614-breadcrumb-issue-when-translating-with-falang#254955 "-- url of the page with the problem -- : test server -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.6 -- Browser(s) name and version -- : Any  We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop  Company Name -&gt; Product Line 1 -&gt; SubCategory 1 Company Name -&gt; Product Line 1 -&gt; SubCategory 2  We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2  We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.  We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category&#95;pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.  However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.  So if we are view a product in subcategory 1 the breadcrumb in English is:  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  In Spanish it becomes (obviously translated in Spanish)  Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name  So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.  Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.  Is there something we can change in the settings to resolve this issue(s)? Thanks, J")*

Hi Nicolas,

I apologise for not replying before but we needed a moment to look at the issue further and we have found a solution to our issues but it required a hack of the source code. We have tested with Hikashop 2.6.4 and Falang 2.7.0 on Joomla 3.6.4.

To recap in our setup we have several products we are assigned to multiple categories. The category views work correctly and the product listings work correctly. The problem was when you viewed a single product and then clicked on the links to scroll though to view other products in the same category. At a certain point it would jump from the current category and begin showing products from a different category.

We kind of solved the problem by going into the configuration in the SEF url section and setting simplified breadcrumbs to "No". It solved the problem in English which is the default language but in other languages the breadcrumb was screwed up. It basically contained repetitions of itself.

So we went back and set simplified breadcrumbs to "Yes" and had a look at the code in com_hikashop/views/product/view.html.php in the frontend and we see in line 1537 this if $category_id is empty it then looks up the category with loadResult() call which just returns a single result. So if a product is assigned to multiple categories this query does not take that into consideration. However the category id is also stored under the menu item params so we added a couple lines of code
Code:

if (!empty($menuData-&gt;hikashop_params['category'])) { $category_id = $menuData-&gt;hikashop_params['category']; }

And that resolved the problem of jumping categories. See attached doc.

We still had this problems in other languages (we had other probems too) when translating the menu items with Falang. We noticed that when we translate the joomla menu item in Falang, unlike other components, in Falang it was impossible to set the hikashop parmas on a per language basis. There is just the message "You need to save this item before accessing the dacShop options". Looking at the falang_content table we see that the hikashop params saved for the menu items were default params but not the complete hikashop menu params

So this took us the file com_hikashop/fields/selectoptions.php in the frontend. In line 23 Code:

if(HIKASHOP_J30 &amp;&amp; !in_array(@$_REQUEST['option'],array('com_falang','com_joomfish'))){

explicitly stops the params being shown when translating the menu item. We modified this line to Code:

if(HIKASHOP_J30 &amp;&amp; !in_array(@$_REQUEST['option'],array('com_joomfish'))){

so that when you translate the menu items the params are shown and are saved in the falang_content table. This resolved the problem of the categories jumping around in other languages because we can access Code:

$menuData-&gt;hikashop_params['category'];

as in other languages. Plus it resolves some inconsistencies in the display between English and other languages.

There are probably very good reasons for not showing the hikashop parmas when translating menu items but in testing so for this has not created any problems. The same for modification of the com_hikashop/views/product/view.html.php file. So for in our testing we have not had any side effects.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODY2MTQtYnJlYWRjcnVtYi1pc3N1ZS13aGVuLXRyYW5zbGF0aW5nLXdpdGgtZmFsYW5nP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

10 years 6 days ago [\#254987](#254987) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Breadcrumb issue when translating with Falang](/forum/26-product-category-display/886614-breadcrumb-issue-when-translating-with-falang#254987 "-- url of the page with the problem -- : test server -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.6 -- Browser(s) name and version -- : Any  We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop  Company Name -&gt; Product Line 1 -&gt; SubCategory 1 Company Name -&gt; Product Line 1 -&gt; SubCategory 2  We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2  We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.  We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category&#95;pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.  However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.  So if we are view a product in subcategory 1 the breadcrumb in English is:  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  In Spanish it becomes (obviously translated in Spanish)  Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name  So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.  Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.  Is there something we can change in the settings to resolve this issue(s)? Thanks, J")*

Hi,

1. I see what you did, but I don't think it would work in all cases. Taking the category from the menu item instead of the category of the current product meansthat you could actually have in the breadcrumb a category which isn't one of the categories of the product. For example, if the category of the menu item is a parent or grand parent of a category of the product.
I would rather recommend to reorder the categories of the product so that the category you want in the breadcrumb is the first one selected in the product edition interface and that will be the one that will be used for the breadcrumb display.

2. In our testing, turning on the options interface for Falang/JoomFish would result in the menu translation edition in Falang to crash. And as it usually isn't necessary to have different options for different languages (you can have different menu items in that case, if that's necessary), we didn't bother looking into the issue further.

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

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

10 years 5 days ago [\#255052](#255052) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Problems scrolling when some products in multiple categories](/forum/26-product-category-display/886614-breadcrumb-issue-when-translating-with-falang#255052 "-- url of the page with the problem -- : test server -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.6 -- Browser(s) name and version -- : Any  We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop  Company Name -&gt; Product Line 1 -&gt; SubCategory 1 Company Name -&gt; Product Line 1 -&gt; SubCategory 2  We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2  We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.  We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category&#95;pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.  However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.  So if we are view a product in subcategory 1 the breadcrumb in English is:  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  In Spanish it becomes (obviously translated in Spanish)  Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name  So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.  Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.  Is there something we can change in the settings to resolve this issue(s)? Thanks, J")*

Hi Nicolas,

1) I have changed the subject because we have set "simplified breadcrumbs" to yes, and the issue we now have is how to display the correct products when scrolling through the product views in a category when one or more products in that category are also assigned to another category. When scrolling through the products, when you arrive at a product which is assigned to more than one category, if $category_id with this database query Code:

if(empty($category_id)){ $query='SELECT a.category_id FROM '.dacshop_table('product_category').' AS a WHERE a.product_id='.(int)$product_id.' ORDER BY a.product_category_id ASC'; $database-&gt;setQuery($query); $category_id = $database-&gt;loadResult(); $filters['category'] = 'a.category_id = '.(int)$category_id; }

it is down to luck for the correct category_id to be found. i.e. return the category id that the user started browsing through. For example the user starts scrolling through the products in category 64, they get to a product which is in category 64 and category 87. Which $category_id is is returned? It could be 64 it could be 87, it depends on which one comes first in the product_category table. So the solutions are 2

1) if there are some products in more than category do not allow users to set "simplified breadcrumbs" to yes, so this way the correct category id can be obtained from the category pathway
2) if "simplified breadcrumbs" is set to yes, then the current category_id needs to be passed to the product view, although how is probably not so straight forward when you in a parent category listing and a single category id is not available

For the issue about falang params I'll start another thread.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODY2MTQtYnJlYWRjcnVtYi1pc3N1ZS13aGVuLXRyYW5zbGF0aW5nLXdpdGgtZmFsYW5nP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

10 years 4 days ago [\#255086](#255086) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Problems scrolling when some products in multiple categories](/forum/26-product-category-display/886614-breadcrumb-issue-when-translating-with-falang#255086 "-- url of the page with the problem -- : test server -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.6 -- Browser(s) name and version -- : Any  We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop  Company Name -&gt; Product Line 1 -&gt; SubCategory 1 Company Name -&gt; Product Line 1 -&gt; SubCategory 2  We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2  We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.  We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category&#95;pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.  However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.  So if we are view a product in subcategory 1 the breadcrumb in English is:  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  In Spanish it becomes (obviously translated in Spanish)  Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name  So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.  Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.  Is there something we can change in the settings to resolve this issue(s)? Thanks, J")*

Hi,

It is not down to luck at all. As I explained, the category returned in that case is always the category that you place in first position in your product.
It's like the main image of the product. It's the first image of the listing of the image of the product when you edit it, and that's the one used on the products listing as the main image of the product.
So just make sure that the category you want to be used is the one that is in first place in the product settings.

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

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

10 years 1 day ago [\#255385](#255385) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Problems scrolling when some products in multiple categories](/forum/26-product-category-display/886614-breadcrumb-issue-when-translating-with-falang#255385 "-- url of the page with the problem -- : test server -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.6 -- Browser(s) name and version -- : Any  We building a test site with English and Spanish (with Falang) We ran into an issue when scrolling backwards and forwards with products that were in more than one category (irrespective of language selected). So for example we have the following category structure in Hikashop  Company Name -&gt; Product Line 1 -&gt; SubCategory 1 Company Name -&gt; Product Line 1 -&gt; SubCategory 2  We then have menu menu links starting with Product Line 1 then two submenu links to SubCategory 1 and SubCategory 2  We find that if you go to if you have a product that is both Subcategory 1 and Subcategory 2, if you go to Subcategory 1 and then view the single product pages and scroll backwards and forwards when you get the product which is in both categories then instead of scrolling products just in Subcategory 1 you then have products from Subcategory 2 and vice versa.  We found that if we set in the datashop configuration -&gt; SEF url options -&gt; Simplified breadcrumbs to NO, so now the URL now has category&#95;pathway-## the problem was resolved. Scrolling backwards and forwards we just see the products in Subcategory 1, or Subcategory 2 are shown.  However changing Simplified Breadcrumbs to NO created another problem. We have the website with English the base language then translated in Spanish. Viewing the products in English everything show correctly. However if you view the products in Spanish the Breadcrumb show incorrectly.  So if we are view a product in subcategory 1 the breadcrumb in English is:  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  In Spanish it becomes (obviously translated in Spanish)  Home &gt; Product Line 1 &gt; SubCategory 1 &gt; Company Name &gt; Product Line 1 &gt; Subcategory 1 &gt; Product Name  So in the breadcrumb we have the menu structure plus the hikashop cateogry structure.  Setting Simplified Breadcrumbs to YES the breadcrumb structure in Spanish returns to normal  Home &gt; Product Line 1 &gt; SubCategory 1 -&gt; Product Name  but then we have problem again of scrolling backwards and forwards when you get to product in more than one category.  Is there something we can change in the settings to resolve this issue(s)? Thanks, J")*

That is clear now which one comes out now. We will try re-ordering the categories to see if we can find a solution.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODY2MTQtYnJlYWRjcnVtYi1pc3N1ZS13aGVuLXRyYW5zbGF0aW5nLXdpdGgtZmFsYW5nP3RtcGw9bWFya2Rvd24=) 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.068 seconds

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