So I've been struggling with the Miva built-in breadcrumbs as well as the Toolkit and Toolbelt versions. Essentially each version of the breadcrumbs was using the History based method. Meaning, it shows the path of where a user came from on the site.
I didn't want that.....I needed the breadcrumbs to just show.....what is the location of this product based on categories.
Note, we are using SEO links in our Miva store which was I think causing the main issue. That issue being.....if you went from a Category page to a product page....and that product was in a different category.....the breadcrumbs would show the category you came from. Not what we wanted.
Now I realize for some stores, this method isn't possible because you might have a product in a lot of categories. For the store I'm working on that's not the case. They sell wallets and the category structure is pretty basic.
So using Toolbelt (Thanks for the tips Ray)....I came up with this:
Basically it just finds the categories that product is in. Then sorts those based on the category display order in Miva. Then writes out the breadcrumbs.
Just posting this here in case it helps anyone else.
-Kevin
I didn't want that.....I needed the breadcrumbs to just show.....what is the location of this product based on categories.
Note, we are using SEO links in our Miva store which was I think causing the main issue. That issue being.....if you went from a Category page to a product page....and that product was in a different category.....the breadcrumbs would show the category you came from. Not what we wanted.
Now I realize for some stores, this method isn't possible because you might have a product in a lot of categories. For the store I'm working on that's not the case. They sell wallets and the category structure is pretty basic.
So using Toolbelt (Thanks for the tips Ray)....I came up with this:
Code:
<div id="breadcrumbs"> <mvt:item name="ry_toolbelt" param="Product_Categories|g.length|g.Product_Code" /> <mvt:item name="ry_toolbelt" param="Array_Sort|5|'A'|'disp_order'|l.all_settings:product_categories|l.all_settings:product_categories_sorted" /> <ul> <li><a href="&mvt:breadcrumbs:homelink;" class="breadcrumb-home">Home</a></li> <mvt:if expr="g.length"> <mvt:item name="ry_toolbelt" param="counter|bc_count=0" /> <mvt:foreach iterator="cat" array="product_categories_sorted"> <mvt:item name="ry_toolbelt" param="counter|bc_count+1" /> <mvt:if expr="g.counter:bc_count EQ g.length"> <li><span class="breadcrumb-border">»</span><a href="/category/&mvt:cat:code;.html"><b>&mvt:cat:name;</b></a></li> <mvt:else> <li><span class="breadcrumb-border">»</span><a href="/category/&mvt:cat:code;.html">&mvt:cat:name;</a></li> </mvt:if> </mvt:foreach> </mvt:if> </ul> </div>
Just posting this here in case it helps anyone else.
-Kevin