Genres to Categories Search
Using Jamroom
I am trying to basically duplicate the music.tpl to become a jrstore area instead. This way people can search for specific store items. I have removed the alphabetical search that was on the music page. I am in the process of changing the side Genre search to be a Category Search.
When I click on the Genre Tab I get this immediately, "The Product Update Was Successfully Saved. Search" and I am not sure why. It does not do this on the music page.
merchandise_categories.tpl (old music_genres.tpl)
<!-- Search Product Category-->
<h3>{jrCore_lang module="jrStore" id="12" default="Category"} {jrCore_lang skin=$_conf.jrCore_active_skin id="24" default="Search"}</h3>
<br />
<form class="margin" method="post" action="{$jamroom_url}/merchandise">
<input type="hidden" name="search_area" value="product_category">
<select class="form_select" name="search_string" style="width:100%; font-size:13px;" onchange="this.form.submit()">
{if isset($_post.search_area) && $_post.search_area == 'product_category'}
<option value="{$_post.search_string}">{$_post.search_string}</option>
{else}
<option value="">{jrCore_lang skin=$_conf.jrCore_active_skin id="168" default="Select A Category"}</option>
{/if}
{jrCore_list module="jrStore" order_by="product_category asc" group_by="product_category" limit="200" template="merchandise_category_row.tpl"}
</select>
</form>
In the drop down I see my 2 test categories which is cool. If I click on 1 though, the row does not change to the specif Category I selected. If I click on the category drop down again, I have duplicates (I display 3 Paintings and One Picture Category in the drop down) listed but I only have 2 test categories.
Apologies for the long thread but this area is a bit complex as Douglas knows hehe.
merchandise.tpl (somewhat modified music.tpl)
{assign var="selected" value="merchandise"}
{assign var="no_inner_div" value="true"}
{if isset($_post.search_area) && $_post.search_area == 'product_category'}
{jrCore_lang skin=$_conf.jrCore_active_skin id="56" default="merchandise" assign="page_title1"}
{assign var="page_title" value="`$_post.search_string` `$page_title1`"}
{else}
{jrCore_lang skin=$_conf.jrCore_active_skin id="56" default="merchandise" assign="page_title"}
{/if}
{jrCore_page_title title=$page_title}
{jrCore_include template="header.tpl"}
<script type="text/javascript">
$(document).ready(function(){ldelim}
jrSkinInit();
{rdelim});
</script>
<div class="container">
<div class="row">
<div class="col3">
<div class="body_1">
{jrCore_include template="side_merchandise.tpl"}
</div>
</div>
<div class="col9 last">
<div class="body_1 mr5">
<div class="container">
<div class="row">
<div class="col12 last">
<div class="body_3">{jrCore_module_url module="jrStore" assign="murl"}
<div class="block_content">
<div id="default_list">
{jrCore_list module="jrStore" profile_id=$_items_profile_id order_by="product_display_order numerical_asc" pagebreak="15" page=$_post.p}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{jrCore_include template="footer.tpl"}
merchandise_category_row.tpl
{if isset($_items)}
{jrCore_module_url module="jrStore" assign="murl"}
{foreach from=$_items item="item"}
<option value="{$item.product_category}">{$item.product_category}</option>
{/foreach}
{/if}
side_merchandise.tpl
</table>
<div id="stats" class="body_3 mb20">
{if isset($_post.search_area) && $_post.search_area == 'product_category'}
<!-- Search Song Genre-->
<h3>{jrCore_lang module="jrStore" id="12" default="Category"} {jrCore_lang skin=$_conf.jrCore_active_skin id="24" default="Search"}</h3>
<br />
<form class="margin" method="post" action="{$jamroom_url}/merchandise">
<input type="hidden" name="search_area" value="product_category">
<select class="form_select" name="search_string" style="width:100%; font-size:13px;" onchange="this.form.submit()">
{if isset($_post.search_area) && $_post.search_area == 'product_category'}
<option value="{$_post.search_string}">{$_post.search_string}</option>
{else}
<option value="">{jrCore_lang skin=$_conf.jrCore_active_skin id="168" default="Select A Category"}</option>
{/if}
{jrCore_list module="jrStore" order_by="product_category asc" group_by="product_category" limit="200" template="merchandise_category_row.tpl"}
</select>
</form>
updated by @dazed: 10/21/14 05:25:13AM