Forum Replies Created
-
AuthorPosts
-
arturvirabyan15Participant
this hook does not help me solve this problem, here is my code that I have at the moment
add_action(‘mvx_frontend_dashboard_product_options_pricing’, ‘add_unit_of_measurement_field’);function add_unit_of_measurement_field() {
?><div class=”form-group”>
<label for=”unit_of_measurement” class=”control-label col-sm-3 col-md-3″>Единица измерения:</label>
<select name=”unit_of_measurement” id=”unit_of_measurement” class=”col-md-6 col-sm-9″>
<option value=”kg”>Килограмм</option>
<option value=”pcs”>Штуки</option>
</select>
</div>
<?php
}add_action(‘mvx_process_product_object’, ‘my_custom_save_unit_of_measurement’, 10, 2);
function my_custom_save_unit_of_measurement($product, $post_data) {
if (isset($post_data[‘unit_of_measurement’])) {
$unit = sanitize_text_field($post_data[‘unit_of_measurement’]);
update_post_meta($product->get_id(), ‘_unit_of_measurement’, $unit);
}
}add_action(‘woocommerce_after_shop_loop_item_title’, ‘my_custom_display_unit_of_measurement’, 15);
add_action(‘woocommerce_single_product_summary’, ‘my_custom_display_unit_of_measurement’, 15);function my_custom_display_unit_of_measurement() {
global $product;
$unit = get_post_meta($product->get_id(), ‘_unit_of_measurement’, true);
if ($unit) {
echo $unit == ‘kg’ ? ‘ килограмм’ : ‘ штук’;
}
}
but this code does not replace the word piece but adds a new line, you can see in the screenshot
screen: https://i.postimg.cc/HWJ2nLNX/profuct.png
here is the code that is responsible for the word piece:
$html[‘quantity_error’] = “<span class=’min_qty’>” . number_format_i18n( (int) $quantity_error ) . ‘</span>’ . __( ‘ piece’, ‘multivendorx’ );
}
and here is the file in which it is located at line 2463: \classes\class-mvx-product.php
what hook to use so that there is a replacement and not an addition?arturvirabyan15ParticipantCan I talk to another moderator?, I don’t think you understand me, I asked you to write a description for the hooks but you didn’t do it, and how do you think I should know what a specific hook does?
arturvirabyan15ParticipantDear Support Team,
I’ve noticed that there is no documentation available for hooks, making it challenging for me to resolve my issue on my own. I need assistance with a specific functionality on my vendor product addition page.
Specifically, I want to add a dropdown selection under the “_sale_price” input field that allows vendors to select the unit of the product as either “kilogram” or “piece.” If a vendor selects “kilogram,” for instance, then the product page should display the price per kilogram.
Additionally, I’m using your Min Max Quantities module, and I’d like to modify the text that currently says “min (e.g., 10 pieces)” to reflect the unit selected by the vendor, like “min (e.g., 10 kilograms)” if kilograms are selected.
Could you please either provide the necessary code that I can insert into my functions.php file or give me the specific hooks with detailed explanations that I would need to implement this functionality?
I would greatly appreciate your prompt assistance on this matter.
arturvirabyan15ParticipantAre you seriously? and where is the documentation for hooks?
arturvirabyan15ParticipantI already need help, because I don’t know the code of your plugin at all, so I need if you can just write documentation, or just tell me how this can be done, well, in which file what should I write, what hooks should I use, etc. I can write the code yourself
arturvirabyan15ParticipantIf presenting the required code is a problem for you, can you give me a guide on how to solve this problem, I tried to write the code, but since I am not familiar with your code, it didn’t work
arturvirabyan15ParticipantDear Support Team,
I hope this message finds you well. First of all, I would like to express my gratitude for your previous assistance; it has resolved the issue I was facing at that time.
I have another issue that I would like your guidance on. I am using your MultiVendorX plugin along with the Min Max Quantities module for my e-commerce website. My website allows sellers to offer products that can either be sold by piece or by weight (kilograms). The Min Max Quantities module is utilized to set the minimum and maximum quantities for these products.
The issue I’m encountering is with the labeling of these minimum and maximum quantities on the product page. Currently, when a minimum quantity is set, the label displayed is “Minimum (10 piece)”. However, for products that are sold by weight, the term “piece” is misleading. Ideally, it should say “Minimum (10 kilograms)” for products that are sold by weight.
Is there a way to customize this aspect of the module so that the unit displayed (‘piece’ or ‘kilogram’) is accurate according to the type of product being sold? Your guidance in resolving this issue would be much appreciated.
Thank you for your time and assistance.
arturvirabyan15ParticipantHello, I don’t need delivery settings, but just to make it clear to the buyer, the seller wrote the price per piece or per kg, I have a grocery store, and the seller can sell the goods both per kg and per piece, so the seller needs to be able to choose this is
arturvirabyan15Participantoke thanks
arturvirabyan15ParticipantThis reply has been marked as private.arturvirabyan15ParticipantYou can check whether admin commission is set up correctly on my website, I want to take a percentage of the price of the product, for example, I have a test product on my website, it costs 400 AMD, and for this price I have set 30%, so I have to earn 120 AMD, but my site does not show how much I earned from this sale, and the vendor’s earnings show 288 AMD, but it should be 280, please check it and let me know so that I can finish the rest of the work and start earning
arturvirabyan15ParticipantAnd you did not say if you can update your plugin on my site, I updated but the problem remains
arturvirabyan15ParticipantPolyLang for Woocommerce refuses to help, just says you have to fix the problem
I gave access you can check what is the problem
how to update problems in the usual way, I myself know, I did it but it didn’t work, I gave you access, you can’t update, solve the problem, check, and just tell me that everything is ready
I understand that you do not want to do this but please help me solve the problem, if necessary I will pay for it
arturvirabyan15ParticipantAnd you can make a video so that I can understand how to update your plugin correctly, or you can do it yourself, I gave you access to the site, and I allow you to update the plugin
arturvirabyan15ParticipantTo watch the video, I must have access, but no, did you install PolyLang or PolyLang for Woocommerce?, your plugin with PolyLang works fine, there is a conflict with PolyLang for Woocommerce
-
AuthorPosts