Customize vendor’s storefront – fix map error – logout redirect

WCMp Vendor Staff

Customize vendor’s storefront – fix map error – logout redirect Open

Viewing 3 reply threads
  • Author
    Posts
    • #86905
      Rockjohn
      Participant

      Hello there!

      I would like to customize the vendor’s shop page, both by using css and by adding extra fields like the ones added when any of the provided shortcodes is used. I ‘ve tried WCMp > Vendor > Vendor Frontend > Custom CSS, but this section seems to be working only for the vendor dashboard.
      Is there any other way for targeting the vendor’s storefront page?

      Also, I ‘ve seen others (on this support forum) asking about overiding templates but yet I haven’t found any complete guidance about doiong so. What is the proper way to edit templates or add them in a single page (shop + store map for example)?

      Another issue is adding filters. The filters are added in a popup (in my product archives) and hence are not appearing on the vendor’s shop page. Could I add another popup in that page as well so that one can filter only vendor’s products this time? Do you have any better suggestions? And on top of that, do you have any product filters plugin in mind that you recommend in order to be more compatible wiht WCMp so I can avoid future conflicts?

      3rd issue: After accepting geolocation this message shows up, “This page can’t load maps correctly”. I thought everything was set up fine but turns out there is an error. Do you have any common reasons in mind as to why maps are not showing as they should.

      Lastly, is there any way to redirect to home page upon logout (logout from vendor’s dashboard). Current setting leaves vendor on same page and so a login form replaces dashboard after logging out.

      Thank you so much for your time!

    • #86947

      Hi Rockjohn, thanks for reaching WCMp support.

      Our replies are inline –

      – Is there any other way for targeting the vendor’s storefront page?

      >> You need to add the css in the style.css of your current active theme, only then they will be reflected on the sho page.

      Please note, the css added via WCMp custom css part, will only affect the dashboard area.

      – Also, I ‘ve seen others (on this support forum) asking about overiding templates but yet I haven’t found any complete guidance about doiong so. What is the proper way to edit templates or add them in a single page (shop + store map for example)?

      >> In order to override the template, you need to follow a certain procedures.
      This doc will help you out better:https://wc-marketplace.com/knowledgebase/wcmp-overriding-templates/

      – After accepting geolocation this message shows up, “This page can’t load maps correctly”. I thought everything was set up fine but turns out there is an error. Do you have any common reasons in mind as to why maps are not showing as they should.

      >> This error usually occurs if the Google Map API Keys are not set properly. Kindly make sure that you have set up the API Keys properly. For further help, you may follow this document to set up the API Keys – https://developers.google.com/maps/documentation/javascript/get-api-key

      – Lastly, is there any way to redirect to the home page upon logout (logout from vendor’s dashboard). Current setting leaves vendor on the same page and so a login form replaces dashboard after logging out.

      >> Currently the vendor upon logout is redirected to this page – https://prnt.sc/qgp0qs. Now, in order to change this flow, you have to do custom code. For this please do follow this code guide :

      add_action('wp_logout','auto_redirect_after_logout');
      function auto_redirect_after_logout(){
      wp_redirect( 'Enter your page link here' );
      exit();
      }
      copy

      Let us know if you have any further queries.

    • #88300
      Rockjohn
      Participant

      Hi,

      – I ‘ve managed to resolve most of the issues with your help. Regarding the maps, just in case anyone faces the same problem, I just added the Places API as it is illustrated in the attached images.

      – Also, I was able to override the template and add my own CSS but I was wondering whether there is any way to prevent loading default/unused CSS so I can stop using ” !important ” in custom CSS. I could customize the whole page myself if possible.

      – In regards to the redirection, it works fine but what if I want it to affect only the logout through the Vendor’s dashboard?
      I ‘ve tried this approach but it didn’t work ( I don’t have a lot of experience in this kind of code! ):

      function logout_redirect(){
      $user = wp_get_current_user();
      if ( in_array( ‘dc_vendor’, (array) $user->roles ) ) {
      wp_redirect( ‘My-home-page’ );
      exit();
      }
      }
      add_action(‘wp_logout’,’logout_redirect’);

      Do you have any idea how to achieve that? Basically, what I want is to hide this login form so that all users (including vendors) are only able to log in via the main login/register form of my site.

      Regards,

      George

    • #88359
      sumit singh
      Moderator

      Hi, add following code in functions.php of your active theme :-

      add_filter('wcmp_vendor_dashboard_header_right_panel_nav', 'redirect_vendor');
      function redirect_vendor($nav) {
        $nav['logout']['url'] = esc_url('add your redirect url here');
        return $nav;
      }
      copy
Viewing 3 reply threads

Please LOGIN to reply to this topic

WCMp bundle is available at a slashed price

Grab It Now