Magic Fields 2 + FoxyPress…E-Commerce Magic!
Magic Fields just got better with their new release…and as a result, so did FoxyPress! Magic Fields 2 is a new plugin based on the older Magic Fields that allows you to create custom fields and groups of fields onto custom posts, pages, and post types. Since FoxyPress products are stored as custom post types, this functionality is now supported by Magic Fields properly.
FoxyPress already lets you define quite a few different attributes of your product, such as categories, price, quantity available, multiple images, and much more. So the question is, why would this be useful? Why can’t I just use the product options or custom attributes within FoxyPress? These are definitely usable and are part of the core functionality of FoxyPress, but can be limiting if you are a developer or have a creative mind. For use with our short-codes and default product templates, I would strongly suggest using the “out of the box” functionality that FoxyPress is always improving, however, if you are an advanced developer and are creating custom templates for a WordPress store, I would suggest looking into MF2 and how that can broaden the functionality of your products/store.
Example:
Sometimes additional information is necessary for a product, whether it is simply information about sizing, or maybe guidelines on how to use the product. One thing that is always helpful when viewing clothing of any kind online, is a size chart. In the past, we could have used the custom attributes field with a link to the size chart image, then pulled it out via the API, but this looks somewhat messy to our users/clients that want to update their products themselves. Ideally you’d want to give them a “pretty” area with a file upload box to input their size chart. Well now you can!
So now that you have your size chart applied to your product, you need to get it out onto your page. Until we can collaborate with Magic Fields more, we can simply use their scripting to grab the custom fields. Here is an example of getting the path of the image, as well as the image itself with an image tag already created. More information can be found through their WIKI.
<?
//produces the hyperlink to the field item
echo(get('size_chart'));
//produces an <img /> tag with the hyperlink as the src
echo(get_image('size_chart'));
?>
With that said, we’d strongly suggest you make MF2 part of your e-commerce arsenal today! Don’t forget to let us know how you’re using FoxyPress by itself, or combined with MF. We’d love to show off your implementation.
