Modified forms to include the enctype='multipart/form-data' to allow for upload fields on product forms.

This commit is contained in:
lucasstark 2011-11-26 06:17:09 -05:00
parent d735f13f70
commit a7e915cdd0
1 changed files with 3 additions and 3 deletions

View File

@ -300,7 +300,7 @@ if (!function_exists('woocommerce_simple_add_to_cart')) {
do_action('woocommerce_before_add_to_cart_form');
?>
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="cart" method="post">
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="cart" method="post" enctype='multipart/form-data'>
<?php do_action('woocommerce_before_to_cart_button'); ?>
@ -327,7 +327,7 @@ if (!function_exists('woocommerce_grouped_add_to_cart')) {
?>
<?php do_action('woocommerce_before_add_to_cart_form'); ?>
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="cart" method="post">
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="cart" method="post" enctype='multipart/form-data'>
<table cellspacing="0" class="group_table">
<tbody>
<?php foreach ($_product->get_children() as $child_id) : $child_product = $_product->get_child( $child_id ); $cavailability = $child_product->get_availability(); ?>
@ -409,7 +409,7 @@ if (!function_exists('woocommerce_variable_add_to_cart')) {
<?php do_action('woocommerce_before_add_to_cart_form'); ?>
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="variations_form cart" method="post">
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="variations_form cart" method="post" enctype='multipart/form-data'>
<table class="variations" cellspacing="0">
<tbody>
<?php foreach ($attributes as $name => $options) : ?>