Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    This issue was fixed in the latest version of DynamiX. See the change log.

    Thread Starter cwz001

    (@cwz001)

    Anyone?

    Thread Starter cwz001

    (@cwz001)

    Sorted.

    Place the [] outside of the variable.

    $instance['gallerycats'] = $new_instance['gallerycats'];

    $categories=  get_categories();
    foreach ($categories as $cat) {
    	$option='<input type="checkbox" id="'. $this->get_field_id( 'gallerycats' ) .'[]" name="'. $this->get_field_name( 'gallerycats' ) .'[]"';
    					if (is_array($instance['gallerycats'])) {
    					foreach ($instance['gallerycats'] as $cats) {
    					if($cats==$cat->term_id) {
    					$option=$option.' checked="checked"';
    					}
    					}
    					}
    					$option .= ' value="'.$cat->term_id.'" />';
    
                        $option .= $cat->cat_name;
                        $option .= ' ('.$cat->category_count.')';
                        $option .= '<br />';
                        echo $option;
                      }
    Thread Starter cwz001

    (@cwz001)

    I’m using something similar to that anyway (see below), It might be just I’m tired but how can I use the “orderbynum” values to re-order output of the posts?


    while ($featured_query->have_posts()) : $featured_query->the_post();

    /****************** Get custom field data ******************/

    $pdata = get_post_meta( $post->ID, 'pgopts', true );

    Thanks again for your time Michael!

    Thread Starter cwz001

    (@cwz001)

    Hi Michael,

    Unfortunately pgopts is an array. Is there no way I can access the orderbynum value or do I need to regsiter the value a different way?

    Thanks

    Forum: Plugins
    In reply to: wp-e-commerce

    I found an issue with products displaying in DESC order within categories even though I set the admin to sort by name and the main product page displayed in ASC. I’ve no idea why it’s set to do this but if you want to reverse it see below.

    within wpsc_query.php find


    // Invert this for alphabetical ordering.
    if (get_option('wpsc_sort_by')=='name') {
    if( $order == 'ASC'){
    $order = 'DESC';
    }else{
    $order = 'ASC';
    }

    if you don’t want to completely destroy the code just simply replace


    if( $order == 'ASC'){
    $order = 'DESC';

    with:


    if( $order == 'ASC'){
    $order = 'ASC';

    Hope that helps

Viewing 6 replies - 1 through 6 (of 6 total)