I’m completely stumped. I’m working on my first eCommerce website using the “Store Module”. The problem that I’m running into is in regards to Categories. I have setup a number or categories for the products. It happens to be a Vacuum store. Here’s my issue….
In the Central Vacuums category there are 7 sub categories that break this category down. (ie. canisters, powerheads, accessories, etc.). I am displaying the list of sub categories based on the URI segment (ie. if you are in the Central Vacuums category it displays the sub categories. I have gone one step further and am only displaying the sub categories that have been selected by at least 1 entry (ie. categories that have never been selected within an entry will not display in the sidebar).
The problem I’m having is that Once I choose a product and am moved to the “Single Entry” page for that specific product, the URI no longer displays the category information and my category and sub category information disappears.
Is there any way to show the category information on a “Single Entry” page?
Sorry this was so long winded. Very confused how to handle this.
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Title</title>
</head>
<!--BODY-->
<body>
<h6>Products</h6>
<ul>
<li><a href="{path='products/index/c/central-vacuums'}">Central Vacuums</a></li>
<li><a href="{path='products/index/c/portable-vacuums'}">Portable Vacuums</a></li>
<li><a href="{path='products/index/c/carpet-steam-cleaners'}">Carpet/Steam Cleaners</a></li>
<li><a href="{path='products/index/c/bare-floor-cleaners'}">Bare Floor Cleaners</a></li>
<li><a href="{path='products/index/c/commercial-equipment'}">Commercial Equipment</a></li>
<li><a href="{path='products/index/c/air-purification-equipment'}">Air Purification Systems</a></li>
<li><a href="{path='products/index/c/parts-and-accessories'}">Parts & Accessories</a></li>
</ul>
<h6>Categories for </h6>
<!--start of categories-->
{if segment_3 =='central-vacuums'}
{exp:gwcode_categories show="90|91|92|93|94|95|96|97" last_only="yes" show_empty="no"}
<a href="#">{cat_name}</a>
{/exp:gwcode_categories}
{/if}
{if segment_3 =='portable-vacuums'}
{exp:gwcode_categories show="83|84|85|86|87|88|89" last_only="yes" show_empty="no"}
<a href="#">{cat_name}</a>
{/exp:gwcode_categories}
{/if}
{if segment_3 =='carpet-steam-cleaners'}
{exp:gwcode_categories show="98" last_only="yes" show_empty="no"}
<a href="#">{cat_name}</a>
{/exp:gwcode_categories}
{/if}
{if segment_3 =='bare-floor-cleaners'}
{exp:gwcode_categories show="99" last_only="yes" show_empty="no"}
<a href="#">{cat_name}</a>
{/exp:gwcode_categories}
{/if}
{if segment_3 =='commercial-equipment'}
{exp:gwcode_categories show="100|101|102|103|104" last_only="yes" show_empty="no"}
<a href="#">{cat_name}</a>
{/exp:gwcode_categories}
{/if}
{if segment_3 =='air-purification-equipment'}
{exp:gwcode_categories show="105" last_only="yes" show_empty="no"}
<a href="#">{cat_name}</a>
{/exp:gwcode_categories}
{/if}
{if segment_3 =='parts-and-accessories'}
{exp:gwcode_categories show="106|107|108|109|110|111" last_only="yes" show_empty="no"}
<a href="#">{cat_name}</a>
{/exp:gwcode_categories}
{/if}
<!--end of categories-->
<h6>Brands for </h6>
<!--start of brands-->
{if segment_3 =='central-vacuums'}
{exp:channel:entries channel="products" category="90|91|92|93|94|95|96|97" status="featured|open"}
{exp:playa:children field="brand"}
<li><a href="#">{title}</a></li>
{/exp:playa:children}
{/exp:channel:entries}
{/if}
{if segment_3 =='portable-vacuums'}
{exp:channel:entries channel="products" category="83|84|85|86|87|88|89"}
{exp:playa:children field="brand"}
<li><a href="#">{title}</a></li>
{/exp:playa:children}
{/exp:channel:entries}
{/if}
{if segment_3 =='carpet-steam-cleaners'}
{exp:channel:entries channel="products" category="98"}
{exp:playa:children field="brand"}
<li><a href="#">{title}</a></li>
{/exp:playa:children}
{/exp:channel:entries}
{/if}
{if segment_3 =='bare-floor-cleaners'}
{exp:channel:entries channel="products" category="99"}
{exp:playa:children field="brand"}
<li><a href="#">{title}</a></li>
{/exp:playa:children}
{/exp:channel:entries}
{/if}
{if segment_3 =='commercial-equipment'}
{exp:channel:entries channel="products" category="100|101|102|103|104"}
{exp:playa:children field="brand"}
<li><a href="#">{title}</a></li>
{/exp:playa:children}
{/exp:channel:entries}
{/if}
{if segment_3 =='air-purification-equipment'}
{exp:channel:entries channel="products" category="105"}
{exp:playa:children field="brand"}
<li><a href="#">{title}</a></li>
{/exp:playa:children}
{/exp:channel:entries}
{/if}
{if segment_3 =='parts-and-accessories'}
{exp:channel:entries channel="products" category="106|107|108|109|110|111"}
{exp:playa:children field="brand"}
<li><a href="#">{title}</a></li>
{/exp:playa:children}
{/exp:channel:entries}
{/if}
<!--end of brands-->
<h6>Shop By Price for {last_segment_category_name}</h6>
<hr>
<ul>
<li><a href="#">$0.00 - $99.99</a></li>
<li><a href="#">$100.00 - $199.99</a></li>
<li><a href="#">$200.00 - $399.99</a></li>
<li><a href="#">$400.00 - $799.99</a></li>
<li><a href="#">$800.00 and over</a></li>
</ul>
</li>
</body>
</html>