Old Vendor Page, Vendor Avatar, Coupon Style.

MultivendorX

Open
Viewing 8 reply threads
  • Author
    Posts
    • #217336
      l.gan
      Participant

      Hello

      Please help me with some questions:

      1. I use the filter:

      add_filter('mvx_load_default_vendor_store', '__return_true');
      Copy

      – it returns the vendor’s starub page.

      But my problem is that the index includes pages with the address (the reviews tab – I don’t need it) https://site.com/seller/chanel/reviews/

      I mean that if, with the filter turned on, you follow the tab link “any vendor/reviews/”, then the page does not return 404, it is simply empty. Please tell me how to delete this page?

      2. How to get a vendor avatar on a product page?
      I tried to paste

      <img src='<?php echo esc_attr($profile); ?>' class='prof-img' />
      Copy

      but this does not give any result.

      3. I have a small issue with class-mvx-widget-vendor-coupons.php. The fact is that starting from line 26

      public function widget($args, $instance)
      Copy

      I introduced additional style classes for the vendor coupon. But I have to constantly edit this file with every update.

      Could you tell me how I can override this function for the function.php file?

      Thank you

    • #217353

      Hello @l.gan Our replies are inline with your queries –
      1. Kindly understand that with the above filter you have only hidden the review page but the functionality of the page is . still there. Now if you want to disable the functionality of the review page on your end as well then you will have to do that by adding custom code on your end.
      2. For this, you will have to add custom code on your end. However you need to use the below shared elements to retrieve the vendor image in the product page –

      
      global $product;
      $vendor_id = get_mvx_product_vendors($product->get_id())->id;
      $vendor = get_mvx_vendor($vendor_id);
      $image = $vendor->get_image();
      
      Copy

      3. Can you please let us know what modifications are you looking for on your end so that we can help you accordingly.

      • #217358
        l.gan
        Participant
        This reply has been marked as private.
    • #217364

      @l.gan Thanks for sharing the code. Our team will check and get back to you accordingly.

    • #217462

      Hello there, Thanks for your cooperation. Our team checked the scenario and we have found out that currently we do not have any hook/filter support for the modification that you are looking for. But not to worry we will add support for such flexibility in future using which you will be able to modify the vendor coupon widget as per your requirement.

      • #217467
        l.gan
        Participant
        This reply has been marked as private.
    • #217468

      Sorry to hear that. Kindly share the error message with us so that we can look into it and help you accordingly.

      • #217471
        l.gan
        Participant

        The code doesn’t show any errors message. It simply breaks the product page if this product does not have a vendor assigned to it.
        If a vendor is assigned to a product, the code works fine.
        Only the page for products that do not have a vendor assigned is broken.

    • #217504

      The code snippet you have shared is not a whole code rather it is just a part of the code. We have checked by adding that code on our end and we are getting errors.
      Can you please share the full code with us that you have added on your end so that we can assist you accordingly.

      • #217510
        l.gan
        Participant
        This reply has been marked as private.
    • #217545

      Hello @l.gan Kindly add the below code in the functions.php file of your current active theme and check again –

      
      add_action( 'woocommerce_after_add_to_cart_button', 'add_c_af_ad_bt' );
      function add_c_af_ad_bt() {
      ?>
      <div>
      <ul>
          <?php 
          global $product;
          if (get_mvx_product_vendors($product->get_id())) {
              $vendor_id = get_mvx_product_vendors($product->get_id())->id;
              $vendor = get_mvx_vendor($vendor_id);
              $image = $vendor->get_image();
              ?>
              <li><img src='<?php echo $image ?>' class='prof-img' /></li>
              <li><span>
               <?php
              echo '<a href="' . $vendor->permalink . '">' . $vendor->page_title . '</a>' ;
              ?>
              </span>
              </li>    
          <?php
          }
          ?>
      </ul>
      </div>
      <?php
      }
      
      Copy

      Let us know if you need any further assistance.

      • #217658
        l.gan
        Participant

        Thanks, could you also add a function to check the discount type of a coupon in the coupon widget update:

        If the discount type of the coupon is “Percent”, then display it next to the discount value as “5%”.
        If the discount type of the coupon is in the current currency, for example: 100 dollars from the order amount or from just the discount amount, then display the currency symbol next to it, for example “100$”.

        Thank you very much for your support of the plugin!

    • #217663

      @l.gan, I have forwarded this to our dev team, they will look into this.

    • #217708

      I have added this in our future enhancement list. Our team team will look into it and if possible add this functionality in our future update. You can keep track of the progress of this enhancement from here https://github.com/multivendorx/MultiVendorX/issues/684.

Viewing 8 reply threads

Please LOGIN to reply to this topic