Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › More Restricted URL for vendor
- This topic has 24 replies, 3 voices, and was last updated 5 years, 11 months ago by WCFM Forum.
- AuthorPosts
- November 5, 2018 at 6:37 am #35760mustafaGuest
Hi,
We want to limit the vendor “Store Name” in the URL To have only Latin characters with no space and only _ allowed. For example, like Instagram usernames.
https://example.com/vendors/%5Byour_store%5DCan that be done?
Thanks
- November 5, 2018 at 8:20 am #35779WCFM ForumMember
HI,
Do you want to apply this rule for store name or store url?
Thank You
- November 5, 2018 at 10:48 am #35792mustafaGuest
It should be for Store URL
- November 6, 2018 at 5:01 am #35872WCFM ForumMember
Ok, we are looking into this.
“_” is not an issue, but restricting Latin characters is difficult.I will update you on this.
Thank You
- November 6, 2018 at 5:41 am #35886mustafaGuest
Hi,
Thanks for your feedback. Please, keep us updated as this feature is a must for our site.
- November 6, 2018 at 6:33 am #35902WCFM ForumMember
Yeah sure!
- November 13, 2018 at 5:15 pm #36627MustafaParticipant
Hi,
Any update on this?
- November 17, 2018 at 4:34 am #36881WCFM ForumMember
We are looking for a solution for this, will update you soon.
As i already mentioned you before – “Latin characters is difficult.”
If you asked me English character then it will be very easy.Thank You
- November 17, 2018 at 8:35 am #36912MustafaGuest
Only English is fine.
- November 18, 2018 at 11:54 am #36994MustafaParticipant
Can you also restrict changes? I mean disallow vendor to change their URL once set.
Thanks
- November 18, 2018 at 2:52 pm #37000WCFM ForumMember
HI,
Kindly add this code to your site –
add_action( 'end_wcfm_membership_registration_form', function() { ?> <script> jQuery(document).ready(function($) { $('#store_name').on('keydown', function( event ) { var key = event.keyCode; return ((key >= 65 && key <= 90) || key == 8 || key == 189 || key == 9 || key == 32); }); }); </script> <?php }); add_filter( 'wcfm_is_allow_store_name', '__return_false' );
This will restrict store name to only characters and “_”.
Also vendors will not able to edit store name and slug later.Thank You
- November 18, 2018 at 5:57 pm #37009MustafaParticipant
Where should I add that code. I’ve added to child-theme function.php file but still no change.
- November 18, 2018 at 6:03 pm #37010WCFM ForumMember
HI,
You have added this at right file, still show me screenshot for this.
Between, what change you are expecting?
Trying to register as a new vendor and you will see limitation at “Store Name” field.
Also check at Vendor’s setting page – Store Name and Store Slug setting option no more available.Thank You
- November 19, 2018 at 8:12 am #37061MustafaParticipant
Hi,
I tested and it works for English but I can still type in Arabic characters for (store slug) which I don’t want to allow.
The changes I am expecting is:
1) I don’t want to restrict vendors from adding whatever they want for “Store Names”.
2) I just want to restrict “Store Slugs”.Thanks for your support.
- November 19, 2018 at 8:22 am #37062WCFM ForumMember
HI,
OK, then you have to wait till WCFM Membership next update.
I will update you as new version will be there.
Thank You
- November 25, 2018 at 6:55 am #37948MustafaParticipant
Hi,
Please, make sure that you add this feature also during upgrade process of vendor account.
Thank you
- November 26, 2018 at 11:25 am #38096WCFM ForumMember
Hi,
What do you mean by “during upgrade process of vendor account”?
Thank You
- November 27, 2018 at 5:57 am #38280MustafaParticipant
Hi,
When vendors change their membership, the form to change their Store Slug is also there.
Regards
- December 4, 2018 at 9:43 am #38984MustafaParticipant
Any update on this?
- December 4, 2018 at 9:45 am #38986WCFM ForumMember
Hi,
WCFM Membership new update not yet released, I will give you support code after that.
Thank You
- December 6, 2018 at 11:52 am #39176WCFM ForumMember
Hi,
Hope you have already updated latest WCFM and WCFM Membership, now please use this code for the purpose ->
add_filter( 'wcfm_generated_store_slug', function( $store_slug ) { $store_slug = preg_replace("/[^a-z0-9-]/", "", $store_slug); return $store_slug; });
Thank You
- December 6, 2018 at 12:03 pm #39184MustafaParticipant
Hi,
It work for English. But what if user tries enter Arabic character?
I want to restrict English character only.
- December 6, 2018 at 12:05 pm #39187WCFM ForumMember
Hi,
It will only allow these characters -> a-z0-9-
if Arabic inserted then those will be removed from slug.
Thank You
- December 6, 2018 at 12:14 pm #39190MustafaParticipant
I checked, they are not removed. You can try this for example: عربي
- December 6, 2018 at 12:39 pm #39194WCFM ForumMember
Hi,
It’s converted to alphanumeric -> https://ibb.co/4KDpR5R
Between, do you have removed this code?
,
Kindly add this code to your site –
add_action( 'end_wcfm_membership_registration_form', function() { ?> <script> jQuery(document).ready(function($) { $('#store_name').on('keydown', function( event ) { var key = event.keyCode; return ((key >= 65 && key <= 90) || key == 8 || key == 189 || key == 9 || key == 32); }); }); </script> <?php });
If it’s there then how you can add other characters there?
Thank You
- AuthorPosts
- The topic ‘More Restricted URL for vendor’ is closed to new replies.