Store Setup Customization Help

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 6 reply threads
  • Author
    Posts
    • #127438
      rohitxd
      Participant

      Hello,

      https://prnt.sc/sbisno – Hello I need to remove this part How can I do it??
      https://prnt.sc/sbsx73 – I want to remove policies tab in here
      https://prnt.sc/sbt4dq – I want to add a text in the seo tab and add the store name he entered in the seo title… Check Screenshot
      https://prnt.sc/sbtga1 – After adding the default description (forum topic i made)< it doesn’t show some required fields…

    • #127619
      Sushobhan
      Keymaster

      Hi,
      If you want to completely remove store policy settings for vendors, go to WCFM admin dashboard >> Capability and uncheck Policies under Settings section. See here- https://imgur.com/sf647fo
      Now to set the store name as SEO title, add the following snippet to your child theme’s functions.php. In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/-

      add_filter( 'wcfm_vendors_settings_fields_seo', function($field, $vendor_id) {
          if ( wcfm_is_vendor( $vendor_id ) ) {
              $store_user = wcfmmp_get_store( $vendor_id );
              $shopname = $store_user->get_shop_name();
              if ( empty( $field['wcfmmp-seo-meta-title']['value'] ) && $shopname ) {
                  $field['wcfmmp-seo-meta-title']['value'] = $shopname;
              }
          }
          return $field;
      }, 10, 2 );

      To add the text blow SEO step title use this following snippet-

      add_action( 'wp_enqueue_scripts', function() {
          if ( wcfm_is_vendor() && filter_input( INPUT_GET, 'store-setup' ) && filter_input( INPUT_GET, 'step' ) === 'seo' ) {
              wp_enqueue_script( 'seo_step_script', get_stylesheet_directory_uri() . '/custom.js', array( 'jquery' ) );
          }
      } );

      You’ll also require to create this custom.js file inside your child theme folder and paste the following code in it-

      jQuery( document ).ready( function ( $ ) {
          $( '<p class="seo_step_suggestion_text">If you don\'t know what to do just skip this step and you\'re good to go</p>' ).insertBefore( 'form' );
      } );

      Alternatively, you can use an existing JS file with some minor tweaking in this code.
      Let me know how this goes.
      Thanks!

    • #127684
      rohitxd
      Participant

      Thanks your code work perfectly!

      BUT
      What about ,
      https://prnt.sc/sbisno Hello I need to remove this part How can I do it??

      and also https://prnt.sc/sc4cg0 – still after removing the policy thing, this appears while adding a product

    • #127691
      Sushobhan
      Keymaster

      Hi,
      Is this vendor is assigned to any group? I yes then you need to change the capability from that group. Group settings got higher priority over general capability settings. If you disable Policies capability then, Policy tab will not show to your vendors dashboard. It will be visible on your admin dashboard though!
      Thank You!

    • #127711
      rohitxd
      Participant

      Is this vendor is assigned to any group
      NOPE!

    • #127949
      rohitxd
      Participant

      Umm hello?

    • #128026
      Sushobhan
      Keymaster

      Hi,
      You are continuing two threads and applying code from both areas. Also you are mixing your requirements in both the tickets. This will definitely put your site in trouble. Unexpected behaviors are common in that case. You have overridden a template file as well which I was unaware of.
      Please keep separate issues, in separate threads.
      On the other topic, lastly you wrote “This code worked instead of that” – so now I’m not sure if the problem still exists or not.
      Let me know.
      Thank You!

Viewing 6 reply threads
  • You must be logged in to reply to this topic.