WordPress.org

Ready to get started?Download WordPress

Forums

WP ECommerce query (1 post)

  1. mpa4hu
    Member
    Posted 1 year ago #

    I'm querying through wpsc_start_category_query and then I want to get only one product from quered product.

    like:
    query category
    category1
    query product by category1
    product1
    query category
    category2
    query product by category2
    and etc..

    <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?>
    $args = array(
    'wpsc_product_category' => 'HERESOMECODE',
    'showposts' => 1,
    'numberposts' => 1,
    'post_status' => 'publish',
    'post_type' => 'wpsc-product'
    );
    $cat1_posts = get_posts($args);
    ?>

    my problem is that I can't give 'wpsc_product_category' => wpsc_category_name();

    any suggestions?
    really easy task and I really broke my brain

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by mpa4hu
  • This topic is not a support question
  • WordPress version: 3.5.1