Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9247027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:37:53+00:00 2026-06-18T09:37:53+00:00

I just started developing in WordPress, specifically with the WP-eCommerce plugin and I’ve run

  • 0

I just started developing in WordPress, specifically with the WP-eCommerce plugin and I’ve run into several issues. One of the primary issues is the ability to query specific products based on it’s existence within two (or more) categories. In this instance, I would like the only products returned to be those that exist in both categories but not just one or the other.

I understand that this can be done on my own (raw php) or with just wp_query (or something alike this). However, I would like to stay within the WP-eCommerce framework as much as possible so as to limit the amount of styling and redundant code required.

For some clarification, an example of this situation would be as such:

query string sent to url – http://example.com/?wpsc_product_category=cat1&wpsc_product_category=cat2

This then gets sent and processed by WP-eCommerce but only takes the most recent wpsc_product_category query, and as a result only returns products that exist within cat2.

So, in conclusion my two primary questions are:

  1. What sort of options are available to me within the WP-eCommerce framework that would allow me to make a query and return a product that exists in both and not just one of the categories.

    • if that isn’t possible, what sort of wordpress options are available to me
    • what about creating my own function?
  2. What exactly is the query process within WP-eCommerce. In the least, I could possibly access the file that formats the query string and get it to query both categories.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:37:54+00:00Added an answer on June 18, 2026 at 9:37 am

    This was solved with the significant help of a colleague of mine.

    Basically, as wpecommerce is structured, it designs the WP-Query to only really manage one variable to search by. In order to circumvent this you need to override the $wp_query variable either in your own function, the file you wish to have multiple queries, etc.

    This was done by utilizing code found from the wordpress codex here

    Excerpt:

     $args = array(
    'post_type' => 'post',
    'tax_query' => array(
        'relation' => 'AND',
        array(
            'taxonomy' => 'movie_genre',
            'field' => 'slug',
            'terms' => array( 'action', 'comedy' )
        ),
        array(
            'taxonomy' => 'actor',
            'field' => 'id',
            'terms' => array( 103, 115, 206 ),
            'operator' => 'NOT IN'
        )
    )
    );
    $wp_query = new WP_Query( $args );
    

    With some modification this allowed me to access the different taxonomy variable relationships directly and string together multiple search variables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started with wordpress and want to start developing my own themes.
I'm just getting started developing for Android and I'm running into a weird problem.
I have just started looking at developing a plugin for Eclipse and I found
I have just recently started developing Windows Form Controls, and one of the controls
I am just getting started developing my first Android app, and one function that
I am just getting started with developing with Zend Framework 2 and I've run
I'm building a site, and have just started getting into developing the backend. The
I just started developing my brand new windows 8 application last week using mvvm
Our team has just started developing for the Sitecore CMS. We find that after
I've just started developing a small C++ program using GraphViz's graph library and noticed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.