Example #1
0
function product_category_edit_form_fields($field)
{
    if (isset($field->term_id)) {
        $cat_img_src = get_product_category_image_id($field->term_id);
    } else {
        $cat_img_src = '';
    }
    implecode_upload_image(__('Select Category Image', 'ecommerce-product-catalog'), 'product_cat_image', $cat_img_src, null, 'id');
}
Example #2
0
function single_custom_design()
{
    $tab = $_GET['tab'];
    $submenu = $_GET['submenu'];
    if ($submenu == 'single-design') {
        ?>
		<script>
			jQuery( '.settings-submenu a' ).removeClass( 'current' );
			jQuery( '.settings-submenu a#single-design' ).addClass( 'current' );
		</script>
		<form method="post" action="options.php">
			<?php 
        settings_fields('single_design');
        $enable_catalog_lightbox = get_option('catalog_lightbox', ENABLE_CATALOG_LIGHTBOX);
        $single_options = get_option('multi_single_options', unserialize(MULTI_SINGLE_OPTIONS));
        ?>
			<h2><?php 
        _e('Design Settings', 'ecommerce-product-catalog');
        ?>
</h2>
			<h3><?php 
        _e('Default Product Image', 'ecommerce-product-catalog');
        ?>
</h3><?php 
        //$name = 'default_product_thumbnail';
        //$button_value = __('Change Default Thumbnail', 'ecommerce-product-catalog');
        //$option_name = 'default_product_thumbnail';
        //upload_product_image($name, $button_value, $option_name);
        implecode_upload_image(__('Upload Default Image', 'ecommerce-product-catalog'), 'default_product_thumbnail', get_default_product_image_src());
        ?>
			<h3><?php 
        _e('Product Gallery', 'ecommerce-product-catalog');
        ?>
</h3>
			<input type="checkbox" title="<?php 
        _e('The image will be used only for product listing when unchecked.', 'ecommerce-product-catalog');
        ?>
" name="multi_single_options[enable_product_gallery]" value="1"<?php 
        checked(1, isset($single_options['enable_product_gallery']) ? $single_options['enable_product_gallery'] : '');
        ?>
><?php 
        _e('Enable product image', 'ecommerce-product-catalog');
        ?>
</br>
			<input type="checkbox" title="<?php 
        _e('The image on product page will not be linked when unchecked.', 'ecommerce-product-catalog');
        ?>
" name="catalog_lightbox" value="1"<?php 
        checked(1, $enable_catalog_lightbox);
        ?>
 ><?php 
        _e('Enable lightbox on product image', 'ecommerce-product-catalog');
        ?>
</br>
			<input type="checkbox" title="<?php 
        _e('The default image will be used on product listing only when unchecked.', 'ecommerce-product-catalog');
        ?>
" name="multi_single_options[enable_product_gallery_only_when_exist]" value="1"<?php 
        checked(1, isset($single_options['enable_product_gallery_only_when_exist']) ? $single_options['enable_product_gallery_only_when_exist'] : '');
        ?>
 /><?php 
        _e('Enable product image only when inserted', 'ecommerce-product-catalog');
        do_action('single_product_design');
        ?>
			<p class="submit">
				<input type="submit" class="button-primary" value="<?php 
        _e('Save changes', 'ecommerce-product-catalog');
        ?>
" />
			</p>
		</form>
		<?php 
    }
}