Forum Replies Created
-
AuthorPosts
-
Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantThis reply has been marked as private.Dhruv Jha
ParticipantHi team, thanks for your wonderful support so far.
Your development team previously provided us with the code to hide the wholesaler price from non-logged-in users. After that, we implemented another custom code to hide the simple price, ‘Add to Cart,’ and ‘Buy Now’ buttons as well. However, we are facing an issue where these elements are not being hidden for variable products. This is the last remaining issue on our site. Could your dev team assist us with this? Once this is resolved, we won’t trouble your team any further.
The code you provided earlier:
add_action(‘init’, ‘custom_change’);function custom_change() {
if ( !is_user_logged_in() ) {
add_filter( ‘mvx_wholesale_price_loop’, ‘__return_false’ );
add_filter( ‘mvx_product_wholesale_price_html’, ‘__return_false’ );
}
}
remove_action( ‘woocommerce_after_variations_form’, array($MVX_Wholesale, ‘wholesale_content_display_variation_products’));
add_action( ‘woocommerce_after_variations_form’, ‘wholesale_content_display_variation_products’);
function wholesale_content_display_variation_products() {
if ( is_user_logged_in() ) {
$wholesale_price = __( ‘Wholesale Price’, ‘wcmp-afm’ );
$currency_symbol = get_woocommerce_currency_symbol();
$minimum_quantity = __( ‘Minimum Quantity’, ‘wcmp-afm’ );
?>
<script>
jQuery(function($) {
var wholesale_price = ‘<?php echo $wholesale_price; ?>’;
var currency_symbol = ‘<?php echo $currency_symbol; ?>’;
var minimum_quantity = ‘<?php echo $minimum_quantity; ?>’;
$(‘form.variations_form’).on(‘show_variation’, function(event, data) { // On selected variation
if (“yes” == data._enable_wholesale) {
var t =
wholesale_price +
“: ” +
currency_symbol +
data._wholesale_price +
“ (” +
minimum_quantity +
“: ” +
data._wholesale_quantity +
“)”;
$(“.single_variation”).append(‘<div class=”woocommerce-variation-wholesale”>’ + t + “</div>”);
} else $(“.single_variation”).find(“.woocommerce-variation-wholesale”).remove();
}).on(‘hide_variation’, function() { /Not on selected variation/ });
});
</script>
<?php
}
}
The code which we added:
/**
Hide Price & Add to Cart for Logged Out Users
*/add_filter( ‘woocommerce_get_price_html’, ‘bbloomer_hide_price_addcart_not_logged_in’, 9999, 2 );
function bbloomer_hide_price_addcart_not_logged_in( $price, $product ) {
if ( ! is_user_logged_in() ) {
$price = ‘<div>‘ . __( ‘Signup to Shop Wholesale’, ‘bbloomer’ ) . ‘</div>’;
remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
add_filter( ‘woocommerce_is_purchasable’, ‘__return_false’ );
}
return $price;
}Dhruv Jha
ParticipantSangita, As I told you earlier we followed the instruction but it didn’t work for us.
Dhruv Jha
ParticipantOhh I can see the SKU now. Can we move it to the next line, please?
One last thing:
Last month, we raised a request to hide two policy boxes on the vendor page and vendor dashboard. Currently, we have achieved this by hiding specific lines in the “vendor-policy.php” file of the MVX Core plugin. Similarly, we are also hiding certain fields on the billing page “vendor-billing.php”.However, for better maintainability, we would prefer a custom code solution that can be implemented in the child theme’s function.php file.
Your team provided the following two links to override the vendor-policies template file and remove the fields:
vendor-policy.php: https://github.com/multivendorx/MultiVendorX/blob/main/templates/vendor-dashboard/vendor-policy.php
vendor-billing.php: https://github.com/multivendorx/MultiVendorX/blob/main/templates/vendor-dashboard/vendor-billing.php
We attempted to follow the steps as per your instructions, but unfortunately, it is not working as expected.
We kindly request your further assistance in resolving this issue. Your expertise and support are greatly appreciated.
Dhruv Jha
ParticipantWe have added both the code but SKU is still now displaying on invoices.
Dhruv Jha
Participant1) Could you please provide an update from Moumita regarding the issue of the product SKU field not being displayed on the invoice?
2) Why is the “Wholesale Item: yes” field appearing on invoices? Since we sell everything wholesale, it seems redundant and unnecessary. (Screenshot: https://prnt.sc/Tk_MSzkfYnxG)
3) Is it possible to include the admin earnings in the vendor’s invoice? Currently, we display this information in the site owner’s invoice, but we also need it to be visible in the vendor’s invoice.
June 20, 2023 at 12:00 PM in reply to: Need help with commissions for vendors and site owner #193594Dhruv Jha
ParticipantWe also need the fix ASAP because our website is already live and we’re getting notifications for this from our vendors and users.
-
AuthorPosts