VENDORS CANNOT ADD PRODUCTS

MultivendorX

Resolved
Viewing 14 reply threads
  • Author
    Posts
    • #197004
      arturvirabyan15
      Participant

      Hello

      My vendors are trying to add products and getting the message “no allowed product types found. please contact site administrator.”

      Can you please help me fix this?

    • #197005

      Not to worry. You just need to go to the admin dashboard >>MultiVendorX >>Modules, here under Marketplace types enable the product types https://prnt.sc/jrh33eik8zC-. 

      If you need any further assistance please let us know.

    • #197010
      arturvirabyan15
      Participant

      Dear 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.

    • #197013
      arturvirabyan15
      Participant

      If 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

    • #197020

      @arturvirabyan15 Currently we do not have support for Minimum/Maximum quantities for products which are sold on the basis of weight. But I have informed the development team to add support for this in future enhancements of MultiVendorX. They will take further decisions regarding the same.
      For now if you want to add such a flow for the Min/Max quantity(weightwise) for products then you can achieve that via adding custom code on your end.
      In this process if you need help please let us know we will surely help you with the hooks/filters.

    • #197029
      arturvirabyan15
      Participant

      I 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

    • #197076

      You can check the coding structure from here https://github.com/multivendorx/MultiVendorX/blob/main/classes/class-mvx-product.php and implement the flow for weight wise quantities on your end.

    • #197082
      arturvirabyan15
      Participant

      Are you seriously? and where is the documentation for hooks?

    • #197084
      arturvirabyan15
      Participant

      Dear 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.

    • #197089

      @arturvirabyan15 Our replies are inline –
      – I’ve noticed that there is no documentation available for hooks, making it challenging for me to resolve my issue on my own.
      >>You can see all new hook/filter lists against the deprecated list, check here: https://github.com/multivendorx/MultiVendorX/tree/main/includes
      – 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?
      >>You can use the below hooks to add and save fields in the add product page of vendor dashboard

      
      mvx_frontend_dashboard_product_options_pricing
      mvx_process_product_object
      
      Copy

      Now, by default we give the vendor option to put product price piecewise and the Min/Max module is also implemented according to that. We do not have any concept of adding product price weight wise.
      So if you want to implement such a flow urgently on your end, you will have to add custom code to achieve that.
      Also we do not have any documentation or readymade code for weight wise min/max quantity. But you can surely have a look at the coding structure of our Min/Max quantity module from here https://github.com/multivendorx/MultiVendorX/blob/main/classes/class-mvx-product.php. And following the same you can implement the weight wise min/max quantity on your end.

    • #197095
      arturvirabyan15
      Participant

      Can 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?

    • #197136

      Hi, you can check our coding structure here : https://github.com/multivendorx/MultiVendorX/blob/main/classes/class-mvx-product.php and goto line 134
      You need to follow the exact coding structure as per this code, while developing your own code.

      But apart from that we don’t have any readymade code snippet.

    • #197152
      arturvirabyan15
      Participant

      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?

    • #197158
      promita
      Keymaster

      Hi, Since you are using similar hooks, the predefined fields in our codebase will naturally be present.

      Now if you want to remove that predefined code of ours, you will have to remove that with the remove action first and then add your custom field using add action.

      we use the below filter to add the piece section that you have mentioned in your screenshot:

      woocommerce_get_price_html
      Copy
    • #215108

      Its been long and we have not heard back from you. We presume your query is resolved now. We are closing this thread. If you need help or face issue in future please create a new support topic.

Viewing 14 reply threads

The topic ‘VENDORS CANNOT ADD PRODUCTS’ is closed to new replies.