select2 sorting, address removing comma

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Feature Request select2 sorting, address removing comma

Viewing 15 reply threads
  • Author
    Posts
    • #54528
      Aleksandra
      Guest

      Hello,
      I have several issues with select2 and I need your help. On the page https://808-beats.com/store-manager/products-manage/ I have attribute BPM which user need to select:
      1. the options are BPM 1, BPM 2…. BPM 300. Attr slug are only numbers 1,2,3. Now sorting order is like for string BPM 1, BPM 10, BPM 100, BPM 2…., but I need it by id to be BPM 1, BPM 2…. <option value=”105″>BPM 1</option><option value=”106″>BPM 2</option>.
      2. change placeholder text from “Search for a attribute …” to “Select BPM…”
      3. change a color of the placeholder – I lost 5 hours to try to change but without success
      4. if vendor put only city/town and country, in store header where is address under the store name the format is following: ,Paris France. Where can I find this array for collecting and formatting display of $address to remove comma in front of town? Even if vendor put his street address, postcode and state/country, I want to display only town and country under the name of the store.
      5. is it possible to add checked=”checked” to attribute to be checked by default ‘<input type=”checkbox” id=”attributes_is_active_3″ name=”attributes[3][is_active]” class=”wcfm-checkbox wcfm_ele attribute_ele simple variable external grouped booking multi_input_block_element” value=”enable” data-name=”is_active” title=”Check to associate this attribute with the product” checked=”checked”‘>
      Thanks for your help.

    • #54898
      WCFM Forum
      Keymaster

      Hi,

      1. the options are BPM 1, BPM 2…. BPM 300. Attr slug are only numbers 1,2,3. Now sorting order is like for string BPM 1, BPM 10, BPM 100, BPM 2…., but I need it by id to be BPM 1, BPM 2….

      – You may change this order from wp-admin -> Products -> Attributes -> Configure Terms

      2. change placeholder text from “Search for a attribute …” to “Select BPM…”

      – Will do this

      3. change a color of the placeholder – I lost 5 hours to try to change but without success

      – Which one? Show me screenshot please!

      4. if vendor put only city/town and country, in store header where is address under the store name the format is following: ,Paris France. Where can I find this array for collecting and formatting display of $address to remove comma in front of town? Even if vendor put his street address, postcode and state/country, I want to display only town and country under the name of the store.

      – Use this filter to modify this –
      apply_filters( 'wcfmmp_store_address_string', $store_address, $vendor_data )

      5. is it possible to add checked=”checked” to attribute to be checked by default ‘

      – Possible, use this filter to modify this – wcfm_product_custom_attributes

      Thank You

    • #55096
      Aleksandra
      Guest

      Hello,
      thank you very much for your fast answer.

      OK, I did everything except 5. Can you please help me with this how to write the code using this filter -wcfm_product_custom_attributes,
      I am not a php developer.
      This is how it is now.
      notchecked

      This is how I want to be when vendor wants to add product, to be already checked :
      checked

      Thank you for your support. It means a lot for all of us.

    • #55236
      WCFM Forum
      Keymaster

      Hi,

      Please use this code for the purpose –

      add_filter( 'wcfm_product_custom_attributes', function( $taxonomy_fields, $att_taxonomy ) {
      	if( isset( $taxonomy_fields[$att_taxonomy] ) && isset( $taxonomy_fields[$att_taxonomy]['value'] ) ) {
      		$attributes = $taxonomy_fields[$att_taxonomy]['value'];
      		$wcfm_attributes = array();
      		if( !empty( $attributes ) ) {
      			foreach( $attributes as $acnt => $wcfm_attribute ) {
      				$wcfm_attributes[$acnt] = $wcfm_attribute;
      				$wcfm_attributes[$acnt]['is_active'] = 'enable';
      				$wcfm_attributes[$acnt]['is_visible'] = 'enable';
      			}
      		}
      		$taxonomy_fields[$att_taxonomy]['value'] = $wcfm_attributes;
      	}
      	return $taxonomy_fields;
      }, 50, 2);

      Thank You

    • #55269
      Aleksandra
      Guest

      Hi,
      thanks for the code. It was active and visible, but not opened and I added just a little
      javascript code in custom js to simulate the click event and now it is opened by default.

      jQuery(document).ready(function( $ ){
      $(“.attributes_collapser”).click();
      });

      thank you for a great great great and fast fast fast support.

    • #55376
      Aleksandra
      Guest

      Hi WC Lovers, again me.

      1. VENDOR REGISTRATION
      I don’t see anywhere in settings that I can check STORE NAME and STORE SLUG

      vendor-settings

      Therefore on registration page for vendors ( Become a vendor ), vendors can not put the store name.

      vendor-register

      2. VENDOR REGISTRATION PAGE SIDEBAR
      This is the page Become a vendor.

      vendor-page

      As you can see on the right side template should be Full width, but sidebar is still there. How to remove it?

      3. MEMBERSHIP
      I saw all your tutorials and on the membership settings page it looks different, I don’t see all options
      as in the tutorial. Plugin is installed. I see only this :

      membership

      I send you 3 big hearts.

    • #55758
      WCFM Forum
      Keymaster

      Hi,

      What you want to know?

      Thank You

    • #55850
      Aleksandra
      Guest

      1. VENDOR REGISTRATION
      Where are STORE NAME and STORE SLUG on the page Become a vendor?
      2. How to remove sidebar from vendor registration page?
      3. Plugin membership is installed and activated, but on settings page
      I see only GENERAL. Where are all the other options and thank you page?

      I sent you all screenshots.
      Thank you

    • #55982
      WCFM Forum
      Keymaster

      Hi,

      1. VENDOR REGISTRATION
      Where are STORE NAME and STORE SLUG on the page Become a vendor?

      – Do you have disabled “Sold By” display?

      2. How to remove sidebar from vendor registration page?

      – It’s page setting, please check at edit page. Possible your theme has a template without sidebar, use that.

      3. Plugin membership is installed and activated, but on settings page
      I see only GENERAL. Where are all the other options and thank you page?

      – Membership setting page is broken! Is any error happening to this page? Please check at wp-admin -> WooCommerce -> Status -> Logs -> fatal_erros log -> is any error generated?

      Thank you

    • #56027
      Aleksandra
      Guest

      1. Solved -ok
      2. Solved -ok

      3. Yes I have errors:

      2019-03-31T14:30:52+00:00 CRITICAL Uncaught Error: Call to undefined method WCFMmp_Dependencies::wcfm_msg91_plugin_active_check() in /home/hara0210/808-beats.com/wp-content/plugins/wc-multivendor-membership/views/wcfmvm-view-memberships-settings.php:344
      Stack trace:
      #0 /home/hara0210/808-beats.com/wp-content/plugins/wc-multivendor-membership/core/class-wcfmvm-library.php(193): include()
      #1 /home/hara0210/808-beats.com/wp-includes/class-wp-hook.php(286): WCFMvm_Library->load_views(‘wcfm-membership…’)
      #2 /home/hara0210/808-beats.com/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
      #3 /home/hara0210/808-beats.com/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
      #4 /home/hara0210/808-beats.com/wp-content/plugins/wc-frontend-manager/core/class-wcfm-library.php(816): do_action(‘before_wcfm_loa…’, ‘wcfm-membership…’)
      #5 /home/hara0210/808-beats.com/wp-content/plugins/wc-frontend-manager/includes/shortcodes/class-wcfm-shortcode-wc-frontend-manager.php(42): WCFM_Library->load_views(‘wcfm-membership…’)
      #6 /home/hara021 in /home/hara0210/808-beats.com/wp-content/plugins/wc-multivendor-membership/views/wcfmvm-view-memberships-settings.php on line 344

    • #56476
      Aleksandra
      Guest

      Can you please help me with this error?
      Deinstalling and installing the plugin didn’t fix it.
      Always the same error.

      Thanks

    • #56480
      WCFM Forum
      Keymaster

      Hi,

      What is your WCFM Marketplace and WCFM Membership plugin version?

      Please update them to the latest version!

      Thank you

    • #56725
      Aleksandra
      Guest

      I updated and now is working.

      I changed several files in marketplace. I created folder under
      wp-content -> themes -> storefront -> wc-multivendor-marketplace -> views -> store -> wcfmmp-view-store-header.php and wcfmmp-view-store-products.php

      but it is not working. Is this hierarchy good or not?

      thanks

    • #56749
      WCFM Forum
      Keymaster

      Hi,

      wp-content -> themes -> storefront -> wc-multivendor-marketplace -> views -> store -> wcfmmp-view-store-header.php and wcfmmp-view-store-products.php

      – this override is not right. It should be – wp-content -> themes -> storefront -> wcfm -> store -> wcfmmp-view-store-header.php and wcfmmp-view-store-products.php

      Thank You

    • #57085
      Aleksandra
      Guest

      Thank you.

      It is working.

    • #57099
      WCFM Forum
      Keymaster

      Thanks for the update 🙂

Viewing 15 reply threads
  • The topic ‘select2 sorting, address removing comma’ is closed to new replies.