Home Forums Theme Support Dokan Product Inventory Problems

This topic is: not resolved

This topic contains 12 replies, has 2 voices, and was last updated by  Nayem 3 years, 6 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #68947

    Donovan
    Member
    Post count: 27

    Hello,

    When someone adds a product we need to set the inventory to 1 automatically. Then when someone purchases an item we need to make sure that no one is able to order the same item again.

    #68951

    Donovan
    Member
    Post count: 27

    So we will need to automatically enable a stock quantity of 1 by default
    Stock Status In stock by default
    Do Not Allow back orders by default

    #69103

    Donovan
    Member
    Post count: 27
    This reply has been marked as private.
    #69104

    Nayem
    Moderator
    Post count: 6480

    Hello Donovan,

    I am really sorry for being late. If you want to enable inventory by default with the value 1 then you have to customize the plugin code. I can provide you the file name. Please open dokan/templates/products/new-product-single.php file. In this file you will get those codes in line number 381.

    Thanks.

    #69111

    Donovan
    Member
    Post count: 27

    Thanks for the reply. I don't believe that's the answer to this puzzle. line 381 reads

    <blockquote><div class="dokan-product-inventory dokan-edit-row dokan-clearfix">
                                <div class="dokan-side-left"></blockquote>
    
    the only option is line 404
                                            
    
    <blockquote><input type="number" name="_stock" placeholder="<?php __( '1', 'dokan' ); ?>" value="<?php echo wc_stock_amount( $_stock ); ?>" min="0" step="1"></blockquote>

    maybe im missing something

    #69202

    Nayem
    Moderator
    Post count: 6480

    Hello,

    I have to discuss with my developer team. Please allow me some time to provide you the right solution.

    #69319

    Donovan
    Member
    Post count: 27
    This reply has been marked as private.
    #69320

    Nayem
    Moderator
    Post count: 6480

    Hello Donovan,

    If we set default 1 then it will create issue in another place. It will require few changes in others file. So, you have to customize the plugin code for that.

    Thanks.

    #69414

    Donovan
    Member
    Post count: 27

    Ok, that's acceptable, please just point me in the right places as I'm familiar with PHP, but not a master so I may need some examples and explanations.

    #69446

    Donovan
    Member
    Post count: 27

    Anything new, any suggestions as we are moving into weekend i will need to close this.

    also, i need to add to all emails sent out

    Seller/Buyer Email, Phone Number and Name

    so the
    Buyer email will read Here's how to get in contact with the Seller, EMAIL, Name and Phone Number
    Seller email will read Here's how to get in contact with the buyer, Email, Name and Phone Number

    I really need to add these to all transaction on the site. Any suggestions.

    #69506

    Nayem
    Moderator
    Post count: 6480

    Hello Donovan,

    I am sorry for being late. This is weekend here. Our developer will be available from tomorrow. Hope I can provide you the instruction tomorrow after discussing with the developer. Please keep patience.

    Thanks.

    #70239

    Donovan
    Member
    Post count: 27
    This reply has been marked as private.
    #70316

    Nayem
    Moderator
    Post count: 6480

    Add those codes in inventory.php line number 8 after this line- $_stock = get_post_meta( $post->ID, '_stock', true ); file (dokan/includes/pro/templates/products/edit)-

    if ( $tax_classes ) {
    
        foreach ( $tax_classes as $class ) {
            $classes_options[ sanitize_title( $class ) ] = esc_html( $class );
        }
    }
    
    ?>

    Then replace this line- <input type="number" name="_stock" id="_stock" step="any" placeholder="10" value="<?php echo !empty( $_stock ) ? wc_stock_amount( $_stock ) : 1; ?>"> with line number 34.

    Thanks.

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Product Inventory Problems’ is closed to new replies.