Link the image from Storefront with Profile image

WCMp Core

Link the image from Storefront with Profile image Open

Viewing 25 reply threads
  • Author
    Posts
    • #85688
      Madalina
      Participant

      Hello,

      I have a question in relation to the profile photo that the vendor uploads in the dashboard. At the moment, the vendor has to upload 2 photos *1 in Profile management -> Profile Image* and *1 in Store Settings -> Storefront* (Please see print screen https://prnt.sc/qag3f2)

      I would like to link these 2 photos so that when the vendor uploads the photo in Storefront (‘Store Logo’ in my case ‘Profile Photo’) to be automatically linked with the one in ‘Profile Manager’ so the same photo will be in both places.

      Please could you help me out to achieve this?

      Thanks,

    • #85791
      sumit singh
      Moderator

      override profile.php template and replace the following codes with line no –> 71

      <?php
      $store_logo = get_user_meta($user->ID, '_vendor_image', true);
      if($store_logo) {
      $str_img = wp_get_attachment_url($store_logo);
      ?>
      <img id="vendor-profile-img" src="<?php echo $str_img; ?>" width="120" alt="dp">
      <?php
      } else { ?>
      <img id="vendor-profile-img" src="<?php echo (isset($vendor_profile_image) && $vendor_profile_image > 0) ? wp_get_attachment_url($vendor_profile_image) :  get_avatar_url($user->ID, array('size' => 120)); ?>" width="120" alt="dp">
      <?php }
      ?>
      copy

      override shop-front.php template and replace the following codes with line no –> 65

      <?php
      $profile_image = get_user_meta($vendor->id, '_vendor_profile_image', true);
      if($profile_image) {
      $prf_img = wp_get_attachment_url($profile_image);
      ?>
      <img id="vendor-profile-img" src="<?php echo $prf_img; ?>" alt="dp">
      <?php
      } else { ?>
      <img id="vendor-profile-img" src="<?php echo (isset($vendor_image['url']) && (!empty($vendor_image['url']))) ? $vendor_image['url'] : $WCMp->plugin_url . 'assets/images/logo_placeholder.jpg'; ?>" alt="dp">
      <?php }
      ?>
      copy
    • #85869
      Madalina
      Participant

      @Sumit, thanks very much for getting back to me

      I’ve done as you said, but unfortunately I’ve had 2 errors come up both in the Profile Management Page and in Storefront. Please see print screens attached with the issues

      Could you please help me to fix these issues?

      Your help is much appreciated,

    • #85870
      Madalina
      Participant

      Please see the other print screen attached as well. Not sure what is going on with the forum but it doesn’t let me attach 2 files & if I use links from ‘prnt.sc’ it doesn’t send anything.

      Thanks,

    • #85871
      Madalina
      Participant

      The attachements are not sending at all. Please see the errors:

      Error from Storefront (instead of the photo this error comes up): plugin_url .’assets/images/?>”alt=”dp”>

      Error from Profile Management (instead of the photo this error comes up): ” alt=”banner”>

    • #85891

      @Madalina, there is an issue with the attachment.

      Can you use some browser extension like a light shot and share the uploaded link, so we can check.

    • #86001
      Madalina
      Participant
    • #86002
      Madalina
      Participant
    • #86004
      Madalina
      Participant

      @Moumita, sorry, had to send the 2 links in separate messages because it didn’t let me to send them in one and like you said attachments are not working either.

      Thank you,

    • #85868
      Madalina
      Participant

      @Sumit, thanks very much for getting back to me

      I’ve done as you said, but unfortunately I’ve had 2 errors come up both in the Profile Management Page and in Storefront. Please see print screens with the issues: https://prnt.sc/qb1xev and https://prnt.sc/qb1xjx

      Could you please help me to fix these issues?

      Your help is much appreciated,

    • #86057

      @Madalina, thanks for sharing the screenshots. However as we are not facing this issue on our end, hence please do share a temporary admin, FTP and vendor access so we can look into this issue.

    • #86140
      Madalina
      Participant
      This reply has been marked as private.
    • #86239
      sumit singh
      Moderator

      Hi, I have fix those errors in your site.

    • #86246
      Madalina
      Participant

      Hi @Sumit, thanks for fixing the error. The only issue now is that the photo is not visible on the right hand sight of the screen when you click on profile https://prnt.sc/qcl3il

      How can I get that same photo to be there also?

      Thank you,

    • #86272
      Madalina
      Participant

      Hi guys, I’ve also noticed that the vendor photo isn’t linked with the one from Reviews – in the vendor’s shop page. What can I do to make it visible in here also https://prnt.sc/qcnqmd ?

      Thanks,

    • #86385
      WCMp Admin
      Keymaster

      Hi, override review.php template in your active theme and add followings :-
      /* add after line no. 74 */

      $author_avatar = get_user_meta( $comment->user_id, '_vendor_image', true );
      copy

      /* replace line no 80 with following line */

      <img width="60" height="60" class="avatar avatar-60 photo" srcset="" src="<?php echo (isset($author_avatar) && $author_avatar > 0) ? wp_get_attachment_url($author_avatar) :  get_avatar_url ($comment->comment_author_email ); ?>" alt="">
      copy
    • #86406
      Madalina
      Participant

      Hello, thanks for getting back to me

      #1. The 2 codes provided for the Review section give this error: 0) ? wp_get_attachment_url($author_avatar) : get_avatar_url ($comment->comment_author_email ); ?>” alt=””>
      Please could you look into this again?

      #2. The profile photo is not visible on the right hand sight of the screen when you click on profile https://prnt.sc/qcl3il
      How can I get that same photo to be there also?

      Thanks for your help,

    • #87760
      Madalina
      Participant

      Hi guys, do you have an update in regards to linking the 2 photos for the vendor?

      Regards,

    • #87818

      Mada, sorry for the delayed response. Our team is checking this, I will keep you posted.

    • #88132

      @Mada, this code will work for the first time, therefore when a vendor is added to the site.

      If he/she add either store photo/profile photo, the corresponding image will also be set. So, please do create a new vendor and check the flow there.

    • #88223
      Madalina
      Participant

      @Moumita,

      Thanks for your reply in regards to this. I’m still due to check whether the photo appears in the reviews sections, but I’ve done the test as you suggested, created a new vendor and I’ve added a photo from Store settings-Storefront-Store Logo. Indeed the photo I’ve added there now matches the one from Profile Management-Profile Image (this is great!). The issue though is that it is not visible when you click on the User Icon on the right hand sight of the screen https://prnt.sc/qo114b

      However, if I upload a photo by going in Profile Management-Profile Image the image is visible when pressing the user icon. So in a way the photos are not properly linked. Could you please look into this for me?
      Thanks a lot,

    • #88225

      Mada, we have added the fix.

      Please check now.

    • #88230
      Madalina
      Participant

      Thank you so much for fixing that. The only problem now is that if the vendor changes the photo by adding a new one in Store settings-Storefront-Store Logo, the new photo is not visible right after he uploads it, but only if he clicks on ‘Save options’. I think it’s strange because he’s not able to be sure that the photo is indeed changed before clicking on ‘Save options’. Please see video with this issue: https://streamable.com/v1hnp

      Thanks,

    • #88276

      @Madalina, did the issue occur for the new vendor?

    • #88279
      Madalina
      Participant

      Hi, yes this happend for a new vendor I’ve just created

    • #88361

      @Madalina, we are looking int this.

      Will keep you posted.

Viewing 25 reply threads

Please LOGIN to reply to this topic

WCMp bundle is available at a slashed price

Grab It Now