Ejemplo n.º 1
0
            <li class="dokan-form-group">
                <div class="dokan-input-group">
                    <span class="dokan-input-group-addon"><?php 
_e('Limit', 'dokan');
?>
</span>
                    <?php 
dokan_post_input_box($post->ID, '_download_limit', array('placeholder' => __('Download Limit. e.g: 4', 'dokan')));
?>
                </div>
            </li>
            <li class="dokan-form-group">
                <div class="dokan-input-group">
                    <span class="dokan-input-group-addon">Expiry</span>
                    <?php 
dokan_post_input_box($post->ID, '_download_expiry', array('placeholder' => __('Number of days', 'dokan')));
?>
                </div>
            </li>
        </ul>
    </div> <!-- .dokan-side-body -->
</aside> <!-- .downloadable -->

<?php 
do_action('dokan_product_edit_after_downloadable');
?>

<aside class="product-gallery">
    <div class="dokan-side-head">
        <?php 
_e('Image Gallery', 'dokan');
Ejemplo n.º 2
0
</label>
        <div class="dokan-w4 dokan-text-left">
            <?php 
dokan_post_input_box($post->ID, '_stock_status', array('options' => array('instock' => __('In Stock', 'dokan'), 'outofstock' => __('Out of Stock', 'dokan'))), 'select');
?>
        </div>
    </div>

    <div class="dokan-form-group">
        <label class="dokan-w4 dokan-control-label" for="_backorders"><?php 
_e('Allow Backorders', 'dokan');
?>
</label>
        <div class="dokan-w4 dokan-text-left">
            <?php 
dokan_post_input_box($post->ID, '_backorders', array('options' => array('no' => __('Do not allow', 'dokan'), 'notify' => __('Allow but notify customer', 'dokan'), 'yes' => __('Allow', 'dokan'))), 'select');
?>
        </div>
    </div>
</div> <!-- .form-horizontal -->
<?php 
$max_product_id = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->posts}` WHERE `post_type` = 'product'");
$sku = $max_product_id + 1;
?>
<script>
var sku=jQuery("#_sku").val();
console.log(sku);
if(sku==''){
	jQuery("#_sku").val('<?php 
echo $sku;
?>
Ejemplo n.º 3
0
        public function seller_policies($post, $post_id)
        {
            if (isset($_GET['product_id'])) {
                $post_id = intval($_GET['product_id']);
            }
            $_delivery_policy = get_post_meta($post_id, '_delivery_policy', true);
            $_return_policy = get_post_meta($post_id, '_return_policy', true);
            $_warranty_policy = get_post_meta($post_id, '_warranty_policy', true);
            $_seller_policy = get_post_meta($post_id, '_seller_policy', true);
            ?>
            <div class="dokan-edit-row dokan-clearfix">
                <div class="dokan-side-left">
                    <h2><?php 
            _e('Policies', 'artgorae');
            ?>
</h2>

                    <p>
                        <?php 
            _e('Manage seller policies.', 'artgorae');
            ?>
                    </p>
                </div>

                <div class="dokan-side-right">
                    <div class="dokan-form-group">
                        <label for="_delivery_policy" class="form-label"><?php 
            _e('Delivery Policy', 'artgorae');
            ?>
</label>
                        <?php 
            dokan_post_input_box($post_id, '_delivery_policy', array('value' => $_delivery_policy));
            ?>
                    </div>
                    <div class="dokan-form-group">
                        <label for="_return_policy" class="form-label"><?php 
            _e('Return Policy', 'artgorae');
            ?>
</label>
                        <?php 
            dokan_post_input_box($post_id, '_return_policy', array('value' => $_return_policy));
            ?>
                    </div>
                    <div class="dokan-form-group">
                        <label for="_warranty_policy" class="form-label"><?php 
            _e('Warranty Policy', 'artgorae');
            ?>
</label>
                        <?php 
            dokan_post_input_box($post_id, '_warranty_policy', array('value' => $_warranty_policy));
            ?>
                    </div>
                    <div class="dokan-seller-policy">
                        <label for="_seller_policy" class="form-label"><?php 
            _e('Seller Policy', 'artgorae');
            ?>
</label>
                        <?php 
            wp_editor(esc_textarea(wpautop($_seller_policy)), '_seller_policy', array('editor_height' => 50, 'quicktags' => false, 'media_buttons' => false, 'teeny' => true, 'editor_class' => 'post_content'));
            ?>
                    </div>
                </div><!-- .dokan-side-right -->
            </div>
            <?php 
        }
Ejemplo n.º 4
0
dokan_post_input_box($post->ID, '_height', array('class' => 'form-control col-sm-1', 'placeholder' => __('height', 'dokan')), 'number');
?>
        </div>
    </div>

    <?php 
if ('yes' == get_option('woocommerce_calc_shipping')) {
    ?>
        <div class="dokan-form-group hide_if_disable">
            <label class="dokan-w4 dokan-control-label" for="_overwrite_shipping"><?php 
    _e('Override Shipping', 'dokan');
    ?>
</label>
            <div class="dokan-w8 dokan-text-left">
                <?php 
    dokan_post_input_box($post->ID, '_overwrite_shipping', array('label' => __('Override default shipping cost for this product', 'dokan')), 'checkbox');
    ?>
            </div>
        </div>

        <div class="dokan-form-group dokan-shipping-price dokan-shipping-type-price show_if_override hide_if_disable">
            <label class="dokan-w4 dokan-control-label" for="shipping_type_price"><?php 
    _e('Additional cost', 'dokan');
    ?>
</label>

            <div class="dokan-w4 dokan-text-left">
                <input id="shipping_type_price" value="<?php 
    echo $_additional_price;
    ?>
" name="_additional_price" placeholder="0.00" class="dokan-form-control" type="number" step="any">
Ejemplo n.º 5
0
</span>
                <?php 
dokan_post_input_box($post_id, '_flat_shipping_cost', array('placeholder' => '9.99'));
?>
            </div>
        </div>
    </div>

    
	<?php 
$_enable_reviews = $post->comment_status == 'open' ? 'yes' : 'no';
?>
    <?php 
dokan_post_input_box($post->ID, '_enable_reviews', array('value' => 'yes', 'label' => __('Enable Reviews', 'dokan')), 'hidden');
?>
    <?php 
dokan_post_input_box($post->ID, '_visibility', array('value' => 'visible'), 'hidden');
?>

    <div class="dokan-form-group">
        <label class="dokan-w4 dokan-control-label" for="_enable_reviews"><?php 
_e('Sold Individually', 'dokan');
?>
</label>
        <div class="dokan-w7 dokan-text-left">
            <?php 
dokan_post_input_box($post->ID, '_sold_individually', array('label' => __('Allow one of this item to be bought in a single order', 'dokan')), 'checkbox');
?>
        </div>
    </div>
</div> <!-- .form-horizontal -->
Ejemplo n.º 6
0
                                                                    <input type="text" name="_sale_price_dates_to" class="form-control datepicker" value="<?php 
echo esc_attr($_sale_price_dates_to);
?>
" maxlength="10" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" placeholder="YYYY-MM-DD">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div> <!-- .show_if_simple -->



                                            <div class="form-group">
                                                <?php 
dokan_post_input_box($post_id, 'post_excerpt', array('placeholder' => 'Short description about the product...', 'value' => $post->post_excerpt), 'textarea');
?>
                                            </div>

                                            <div class="form-group">
                                                <?php 
$product_cat = -1;
$term = wp_get_post_terms($post_id, 'product_cat', array('fields' => 'ids'));
if ($term) {
    $product_cat = reset($term);
}
wp_dropdown_categories(array('show_option_none' => __('- Select a category -', 'dokan'), 'hierarchical' => 1, 'hide_empty' => 0, 'name' => 'product_cat', 'id' => 'product_cat', 'taxonomy' => 'product_cat', 'title_li' => '', 'class' => 'product_cat form-control chosen', 'exclude' => '', 'selected' => $product_cat));
?>
                                            </div>
                                        </div>
                                    </div>
Ejemplo n.º 7
0
            <li class="dokan-form-group">
                <div class="dokan-input-group">
                    <span class="dokan-input-group-addon"><?php 
_e('Limit', 'dokan');
?>
</span>
                    <?php 
dokan_post_input_box($post->ID, '_download_limit', array('placeholder' => __('Number of times', 'dokan'), 'min' => 1, 'step' => 1), 'number');
?>
                </div>
            </li>
            <li class="dokan-form-group">
                <div class="dokan-input-group">
                    <span class="dokan-input-group-addon">Expiry</span>
                    <?php 
dokan_post_input_box($post->ID, '_download_expiry', array('placeholder' => __('Number of days', 'dokan'), 'min' => 1, 'step' => 1), 'number');
?>
                </div>
            </li>
        </ul>
    </div> <!-- .dokan-side-body -->
</aside> <!-- .downloadable -->

<?php 
do_action('dokan_product_edit_after_downloadable');
?>

<aside class="product-gallery">
    <div class="dokan-side-head">
        <?php 
_e('Image Gallery', 'dokan');
Ejemplo n.º 8
0
    </div>

    <div class="form-group show_if_simple">
        <label class="col-md-4 control-label" for="_backorders"><?php 
_e('Dimensions (cm)', 'dokan');
?>
</label>
        <div class="col-md-8 product-dimension">
            <?php 
dokan_post_input_box($post->ID, '_length', array('class' => 'form-control col-sm-1', 'placeholder' => __('length', 'dokan')), 'number');
?>
            <?php 
dokan_post_input_box($post->ID, '_width', array('class' => 'form-control col-sm-1', 'placeholder' => __('width', 'dokan')), 'number');
?>
            <?php 
dokan_post_input_box($post->ID, '_height', array('class' => 'form-control col-sm-1', 'placeholder' => __('height', 'dokan')), 'number');
?>
        </div>
    </div>

    <div class="form-group show_if_simple">
        <label class="col-md-4 control-label" for="_backorders"><?php 
_e('Shipping Class', 'dokan');
?>
</label>
        <div class="col-md-8 product-dimension">
            <?php 
// Shipping Class
$classes = get_the_terms($post->ID, 'product_shipping_class');
if ($classes && !is_wp_error($classes)) {
    $current_shipping_class = current($classes)->term_id;
Ejemplo n.º 9
0
                                <div class="dokan-form-group">
                                    <label for="_purchase_note" class="form-label"><?php 
        _e('Purchase Note', 'dokan');
        ?>
</label>
                                    <?php 
        dokan_post_input_box($post_id, '_purchase_note', array('placeholder' => __('Customer will get this info in their order email', 'dokan')), 'textarea');
        ?>
                                </div>

                                <div class="dokan-form-group">
                                    <?php 
        $_enable_reviews = $post->comment_status == 'open' ? 'yes' : 'no';
        ?>
                                    <?php 
        dokan_post_input_box($post_id, '_enable_reviews', array('value' => $_enable_reviews, 'label' => __('Enable product reviews', 'dokan')), 'checkbox');
        ?>
                                </div>

                            </div>
                        </div><!-- .dokan-other-options -->

                        <?php 
        if ($post_id) {
            ?>
                            <?php 
            do_action('dokan_product_edit_after_options');
            ?>
                        <?php 
        }
        ?>
                    <div class="dokan-text-left">
                        <?php 
        dokan_post_input_box($post_id, '_tax_status', array('options' => array('taxable' => __('Taxable', 'dokan'), 'shipping' => __('Shipping only', 'dokan'), 'none' => _x('None', 'Tax status', 'dokan'))), 'select');
        ?>
`
                    </div>
                </div>

                <div class="dokan-form-group dokan-w">
                    <label class="dokan-control-label" for="_tax_class"><?php 
        _e('Tax Class', 'dokan');
        ?>
</label>
                    <div class="dokan-text-left">
                        <?php 
        dokan_post_input_box($post_id, '_tax_class', array('options' => $classes_options), 'select');
        ?>
                    </div>
                </div>
            </div>
        </div>
        <?php 
    }
    ?>
    </div><!-- .dokan-side-right -->
</div><!-- .dokan-product-inventory -->
<?php 
}
?>

<?php