Display products in hierarchy using php

<pre> taxonomy_terms_hierarhically_output(0, ‘product_category’); function taxonomy_terms_hierarhically_output($parent_id, $taxonomy) { $termId = isset($_GET[‘cat’])?$_GET[‘cat’]:0; $args = array( ‘parent’ =&gt; $parent_id, ‘hide_empty’ =&gt; false ); $child_terms = get_terms($taxonomy, $args); foreach ($child_terms as $child_term) { $child_term->name; taxonomy_terms_hierarhically_output($child_term->term_id, $taxonomy); } } </pre>

Continue reading


How to create custom extensions in asp.net mvc

Custom Extension in ASP.NET MVC 1. Create a folder named Utilities inside project folder. 2. Create your extension class as static class. namespace AlobinProject.Utilities { public static class Utilities { public static string HelloWorld(this HtmlHelper html) { return “Hello World”; } } } 3. Create a static method inside the extension class. 4. Declare the […]

Continue reading