felipemonteiro44
Forum Replies Created
-
I tried this other way, but I have not had results yet:
function save_qtd_atacado($variation_id, $i){
global $post;
if( $post->post_type == ‘product’ )
$product = wc_get_product( $post->ID );$available_variations = $product->get_available_variations();
foreach ( $available_variations as $variation_values ) {
$variation_id = $variation_values[‘variation_id’]; // variation id
}
update_post_meta($variation_id, ‘qtd_atacado’, $_POST[‘qtd_atacado’][$i]);}
add_action(‘woocommerce_save_product_variation’, ‘save_qtd_atacado’, 10, 2);In the directory: wp-content\plugins\dc-woocommerce-multi-vendor\lib\jquery\upload\frontend-media-upload.js I changed where I was “wcmp-cropper” and “wcmp_crop_image” for “crop-image” and it worked again.
Forum: Fixing WordPress
In reply to: Quantity stock. DoubtOn the WooCommerce order page within wp-admin there is a “Order Notes” field. One of the notes is the product and the quantity that has been reduced from the stock. Where is that snippet of code that queries that amount?
How do I reset capabilities of user dc_vendor and dc_sub_vendor
And how do I customize the plugin to be able to do this? I need this function urgently
Yes!
Is it possible for two users dc_vendor to access the same panel? There will be two users to administer the store with the same permission level
Is there a way for another type of user other than dc_vendor to have access to the dashboard?
add-product, products, orders, storefront, etc…
And how do I limit the modules that each user with the dc_vendor function can access?
More then I would need to create the manager user as dc_vendor?
I’m adding in the frontend
Perfect. worked very wel!!
I tried so more I did not succeed.
FUNCTIONS.PHP
function save_qtd_atacado($product_id , $form_data){
$current_post = get_post( $product_id);
$current_post[‘qtd_atacado’] = $form_data[‘qtd_atacado’];
wp_update_post($current_post);
}
add_action(‘after_wcmp_fpm_meta_save’, ‘save_qtd_atacado’);ADD-PRODUCTS.PHP
<div class=”col-12 col-md-4″>
<label class=”text-white”>Quant. min. para atacado</label>
<input class=”form-control form rounded-0″ id=”qtd_atacado” name=”qtd_atacado” value=”<?= get_post_meta($product_id, ‘qtd_atacado’,true); ?>”>
</div>I’ve been looking at another post here in the forum, this one: https://wc-marketplace.com/support-forum/topic/allowing-vendor-to-control-visibility/
But I could not understand how to save the value that I put in the input and if I access the page again retrieve the value that I had already placed before in the same input of the text type?
I also did not understand how to use wp_update_post with a custom term. The example uses the post_status. How to use / create my own term?
Thank you for your support