Esempio n. 1
0
function widget_checkout($args)
{
    global $wpdb, $table_prefix;
    extract($args);
    //$options = get_option('widget_wp_shopping_cart');
    $title = empty($options['title']) ? __(TXT_WPSC_CATSANDBRAND) : $options['title'];
    echo $before_widget;
    $full_title = $before_title . $title . $after_title;
    echo $full_title;
    show_cats_brands('sidebar');
    echo $after_widget;
}
function widget_wpsc_categorisation($args, $widget_args = 1)
{
    global $wpdb;
    extract($args, EXTR_SKIP);
    if (is_numeric($widget_args)) {
        $widget_args = array('number' => $widget_args);
    }
    $widget_args = wp_parse_args($widget_args, array('number' => -1));
    extract($widget_args, EXTR_SKIP);
    // Data should be stored as array:  array( number => data for that instance of the widget, ... )
    $option_name = 'widget_wpsc_categorisation';
    $options = get_option($option_name);
    if (!isset($options[$number])) {
        return;
    }
    $my_options = $options[$number];
    $title = empty($my_options['title']) ? __('Categories', 'wpsc') : $my_options['title'];
    echo $before_widget;
    $full_title = $before_title . $title . $after_title;
    echo $full_title;
    $selected_categorisations = array_keys($my_options['categorisation'], true);
    if ($selected_categorisations != null) {
        foreach ($selected_categorisations as $key => $selected_categorisation) {
            $selected_categorisations[$key] = (int) $selected_categorisation;
        }
        $selected_values = implode(',', $selected_categorisations);
        $categorisation_groups = $wpdb->get_results("SELECT * FROM `" . WPSC_TABLE_CATEGORISATION_GROUPS . "` WHERE `id` IN ({$selected_values}) AND `active` IN ('1')", ARRAY_A);
        foreach ($categorisation_groups as $categorisation_group) {
            echo "<div id='categorisation_group_" . $categorisation_group['id'] . "'>\n\r";
            if (count($categorisation_groups) > 1) {
                // no title unless multiple category groups
                echo "<h2 class='categorytitle'>{$categorisation_group['name']}</h2>\n\r";
            }
            show_cats_brands($categorisation_group['id'], 'sidebar', 'name', $my_options['image']);
            echo "\n\r";
            echo "</div>\n\r";
        }
        //echo("<pre>".print_r($selected_categorisations,true)."</pre>");
    } else {
        show_cats_brands(null, 'sidebar');
    }
    echo $after_widget;
}
Esempio n. 3
0
							<li>Headpieces</li>
							<li>Necklaces</li>
						</ul>
					</li>
					<li id="navi-kv"><a href="./kochyan-valley-designs">Kochyan Valley Designs</a></li>
				</ul>
		</div>
		<!-- class="grid_3 prefix_3" -->
	
		
		
		<div id="scrolltop"></div>
	
		<!-- <div id="productsc">
				<div id="products">
					<div id="productstab">
						<span>Products</span>
					</div>
					<?php 
echo show_cats_brands();
?>
				</div>
			</div>		 -->
	</div><!-- end header -->
	

	
	

	
Esempio n. 4
0
function nzshpcrt_display_categories_groups()
{
    global $wpdb;
    if (get_option('permalink_structure') != '') {
        $seperator = "?";
    } else {
        $seperator = "&amp;";
    }
    if (function_exists('gold_shpcrt_search_form') && get_option('show_search') == 1) {
        echo gold_shpcrt_search_form();
    }
    //include("show_cats_brands.php");
    if (get_option('cat_brand_loc') == 0) {
        show_cats_brands();
    }
}