Support » Plugin: FoxyShop » Accessing Categories and Products

  • Resolved madla


    Just installed foxyshop and am trying to figure out if it will work for my project.
    I have a catalog with subcategories of lots of products. Each product has variations with separate skus and multiple (mostly 2) parts:

    Hardware <- category
       Metal Hardware <-sub category
          Eye End <-product
             SKU        description
             83921 - for 3/4 tube <- product part 1
                          for 1/4 bolt  <- product part 2
             83920 - for 7/8 tube
                          for 1/4 bolt

    Is this setup possible?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author sparkweb


    I can’t think of a great way of doing this. I think that might need to consider Setting the variations up with the SKU’s in the name. So it would look like:

    Eye End
    3/4 tube (83921)
    7/8 tube (83920)

    Or, you could set them up as bundled products, that sounds pretty complicated as well if you have tons of products.

    Let me ask the question a bit differently.

    From a FoxyCart perspective I want to be able to order each SKU.

    So I figured I can use variations. I setup each (3/4 tube and 7/8 tube) as a description field:
    Name & displayKey is the SKU and into the description field I entered the details.

    So will that allow me to order any one of those as well as all of those? What info is used to push foxyCart so it knows what the user wants to order?

    Plugin Author sparkweb


    You want to be able to order each SKU as a separate product? If you want the SKU to be product code, you can only have one per product. If you have multiple products to add to cart at once, you can add them through bundling. If you want to add multiple products to the cart based on variations, this might need a custom solution. Pretty dang complicated.

    How about this as an approach? Would this work better?

    Hardware <- category
       Metal Hardware <-sub category
          Eye End <-sub-sub category (instead of a product)
             SKU        description
             83921 - for 3/4 tube <- product one description
                          for 1/4 bolt  <- part of product one description
             83920 - for 7/8 tube <- product two description
                          for 1/4 bolt

    Would that allow me to search for each product based on SKU/name?
    That should make it easy to later add each product/sku separately to the cart?

    I’d have to just change the category page display so that sub-sub categories are not part of the categories display and pull the details in on the sub-sub category.

    I’d also have to figure out how to add an image to a category through the admin section. My gut tells me that would require a change to the plugin, right?

    Thanks in advance…

    Plugin Author sparkweb


    I don’t have any particularly good ideas on the organization, but it sounds like your suggestion might definitely work. To get category images, you’ll want to download the Taxonomy Images plugin. FoxyShop has been optimized to work directly with it.

    A follow up on this…

    Do you have any suggestions how I could easily identify a sub sub category or ‘group’ of products.

    Is there a way to add some additional information e.g. ‘category type’ like group to a category that I can access when displaying categories vs groups of products?

    Thanks again…foxyshop is quite amazing.

    Plugin Author sparkweb


    Well if you are wanting to make a purely graphical change, you can use CSS to narrow it down:

    ul#category_list > li > ul > li > ul > li { treat this differently }

    If you need to actually do something different, though, you could do a modified version of helperfunctions.php > foxyshop_category_children(). I would also look at this function which was added to WP in 3.1: get_ancestors(). That will create an array of the taxonomy parents so you could look at the size of that array to see how deep in you are and do something differently. See this in action in foxyshop_breadcrumbs()

    As a rule, if you are changing functions from the core plugins files, make sure you use a new function name and store those changes in your function.php file so the plugin can be upgraded later without overwriting your changes. And if you come up with something that could be tweaked in a core file to make it more adaptable for you and everyone I’m all ears for improving it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Accessing Categories and Products’ is closed to new replies.