Product Inventory Problems

This topic contains 12 reply and 2 voices, and was last updated by Nayem 8 years, 7 months ago
Viewing 12 Posts - 1 through 12 (of 12 total)
Author Posts
August 25, 2015 at 10:55 am 68947
Nayem 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.
August 25, 2015 at 11:09 am 68951
Donovan Donovan

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

August 26, 2015 at 1:38 pm 69103
Donovan Donovan This reply has been marked as private.
August 26, 2015 at 1:49 pm 69104
Nayem Nayem

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.

August 26, 2015 at 2:05 pm 69111
Donovan Donovan

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

August 26, 2015 at 7:37 pm 69202
Nayem Nayem

Hello,

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

August 27, 2015 at 2:45 pm 69319
Donovan Donovan This reply has been marked as private.
August 27, 2015 at 2:50 pm 69320
Nayem Nayem

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.

August 27, 2015 at 8:29 pm 69414
Donovan Donovan

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.

August 28, 2015 at 3:00 pm 69446
Donovan Donovan

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.

August 29, 2015 at 12:40 pm 69506
Nayem Nayem

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.

September 3, 2015 at 3:02 am 70239
Donovan Donovan This reply has been marked as private.
September 3, 2015 at 5:05 pm 70316
Nayem Nayem

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 12 Posts - 1 through 12 (of 12 total)