Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

FoxyShop, ACF & Custom Post Types

Ok, here is my scenario. I am looking to utilize a custom post type, created by me, outside of FoxyShop that still allows me to use FoxyShop/Cart 's capabilities. So for example, I will be adding a bunch of bands to a custom post type called, "Bands" outside of FoxyShop. Is it possible to add in custom fields using ACF (Advanced Custom Fields) such as price, date, etc. and still use FoxyShop/Cart capabilities? Or is there a way to add in FoxyShop's custom fields?

I will still however be using FoxyShop for adding different items, just not the bands.

Any guidance on this would be helpful. Thanks again!
Comments
  • fc_jedfc_jed FoxyCart Team
    @captain_yar

    Interesting question. I'm not that familiar with what you're asking. I'll consult with the team and we'll get back to you with more information.
  • @fc_jed

    Thanks, I look forward to hearing from you guys.
  • So I went ahead and created the custom post type with the custom fields. I just utilized the basic FoxyCart code in this instance. So far, so good.

    Let me know if you guys have anything further to input.
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Hi @captain_yar,

    Fun... I love working with ACF - it makes the process of building cool stuff in WordPress really painless. Usually I would use it to add custom fields to the FoxyShop post type, but your situation is a little trickier since you are wanting to use a non-FoxyShop post type. That's fine, but it will just require some custom buildout. Basically, you'll want to build some pages that loop through the Bands post type items and creates products and links or add to cart forms. You could probably setup a loop and then use some of the functions from foxyshop/helperfunctions.php to build this.

    Does that give you some ideas?
  • @sparkweb

    Hey, thanks for the response. What I went ahead and did was create the custom post type with the ACF fields, then from there I created a custom page bringing in the loop for that custom post type. FoxyShop/Cart comes into play when the user clicks on the individual post to go to the single page. On this single page, I am using just plain FoxyCart form code to add tickets to the cart. Everything seems to be working as it should as the loader.js is already included on this page.

    If I have any other questions, I'll be sure to let you guys know. Thanks again.
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Awesome! Sounds like you got it working great :)
Sign In or Register to comment.