prestashop 1.7 change lenght product name [closed] - prestashop

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I tried create new product of length 2 charset but it get error "This value is too short. It should have 3 character or more." How can I change min length?

You can change in following file
prestashop17\src\PrestaShopBundle\Form\Admin\Product\ProductInformation.php
line no 150
new Assert\Length(array('min' => 3, 'max' => 128))

Related

I'm tiring to create a new user in Moodle using auth_email_signup_user but I'm not sure how to format the request [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have a few required custom profile fields that are date pickers and checkboxes. and I'm not sure what type to put them as in the request the only example the documentation has is one with type string. I keep getting the response
{
"exception": "invalid_parameter_exception",
"errorcode": "invalidparameter",
"message": "Invalid parameter value detected",
"debuginfo": ""
}
this is my request below:
https://example.com/webservice/rest/server.php?wstoken=faketoken&wsfunction=auth_email_signup_user&moodlewsrestformat=json&username=fromapp&password=FakePass123&firstname=From&lastname=App&email=fake#mailinator.com&customprofilefields[0][type]=text&customprofilefields[0][name]=profile_field_Church&customprofilefields[0][value]=JesusYouth&customprofilefields[1][type]=date&customprofilefields[1][name]=profile_field_DOB&customprofilefields[1][value]=2014-06-19&customprofilefields[2][type]=checkbox&customprofilefields[2][name]=profile_field_Saved&customprofilefields[2][value]=1&customprofilefields[3][type]=text&customprofilefields[3][name]=profile_field_Sex&customprofilefields[3][value]=Male&customprofilefields[4][type]=text&customprofilefields[4][name]=profile_field_phone_no&customprofilefields[4][value]=1-868-479-8661&customprofilefields[5][type]=text&customprofilefields[5][name]=profile_field_Marital&customprofilefields[5][value]=Single
I'm not sure what I need to do to make this request work and the documentation doesn't give much insight or I just haven't found it
So after playing around with the request on postman what I discovered is that the only type you need to use is string. I also discovered that for date fields the value must be unixtime and for checkboxes the value must be either 0 or 1.
https://example.com/webservice/rest/server.php?wstoken=faketoken&wsfunction=auth_email_signup_user&moodlewsrestformat=json&username=formapp7&password=fakepassword&firstname=From7&lastname=App7&email=fake#mailinator.com&customprofilefields[0][type]=string&customprofilefields[0][name]=profile_field_church&customprofilefields[0][value]=JesusYouth&customprofilefields[1][type]=string&customprofilefields[1][name]=profile_field_saved&customprofilefields[1][value]=Yes&customprofilefields[2][type]=string&customprofilefields[2][name]=profile_field_man&customprofilefields[2][value]=0&customprofilefields[3][type]=string&customprofilefields[3][name]=profile_field_born&customprofilefields[3][value]=1630813061&customprofilefields[4][type]=string&customprofilefields[4][name]=profile_field_single&customprofilefields[4][value]=Single&customprofilefields[5][type]=string&customprofilefields[5][name]=profile_field_aboutyou&customprofilefields[5][value]=Well i am new
This is an example of how a request would look where profile_field_man is a checkbox and profile_field_born is a date field. something also worth noting is that 'born' is the short name of the profile field mentioned before and the words 'profile_field_' must be prepended to it. I hope this helps anyone trying to use auth_email_signup_user

selenium webdriver word count from page source [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
how to get edit id count
i have tried as belowpagesource code
string[] rowcount=driver.getPageSource().split("a
The ideal method is the one suggested by Buaban, you should ideally use findElements for such purposes using the element attributes:
int rowcount = driver.findElements(By.xpath("\\a[contains(#id,'edit')]")).size();
But if still you want to go via getPageSource(), it's going to be a bit tricky. Since, you would be getting a string now without much distinction between elements and their attributes. You'll have to use some core java concepts here:
String str = driver.getPageSource();
String findStr = "id=\"edit";
int rowcount = str.split(findStr, -1).length-1;
Hope, it helps.
You can find the elements that id contains 'edit' then count the results. See code below:
int rowcount = driver.findElements(By.cssSelector("[id*='edit']")).size();

How to get Entire Product Category hierarchy of an ebay site? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
There is an existing stackoverflow question which answers this question but the call isn't working anymore.
I tried adding http://open.api.ebay.com/Shopping?callname=GetCategoryInfo&appid=YOUR-APP-ID&siteid=3&CategoryID=-1&version=729&IncludeSelector=ChildCategories&DetailLevel=ReturnAll
But it didn't help.
It is still possible to return the entire hierarchy in one call?
To the call but that didn't help.
this is what works for me. I am able to get all categories with this URL:
var url = "http://open.api.ebay.com/Shopping";
url += "?callname=GetCategoryInfo";
url += "&appid=YourAppId"; //replace with your appID
url += "&siteid=0"; //3 = UK | 0 = US
url += "&callbackname=cb_listCategories"; //callback function
url += "&CategoryID=-1";
url += "&version=729";
url += "&IncludeSelector=ChildCategories";
url += "&responseencoding=JSON"; //or XML for example
After that, it's just a matter of listing the categories on your html by creating a callback function, called "cb_listCategories" in my example.
Please let met know if I can help any further. Take care.

To write a function, to get the next folder level in the file path [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am new to sql server, I need to do a task where a function should be created, and in that, a string of a file path will be given as an input parameter and it should give the rest of the file path as output.
For example, "Users\appu\Documents\Visual Studio 2008\Projects" is the file path, here if I give Users as input parameter it should give the next folder level, or if I give Documents as input parameter, it should give next folder level after that which is '\Visual Studio 2008'.
In this way I need to write a function, can you guys help me in this please.
Thanks,
Ranjit
Please try:
declare #Str nvarchar(max), #SearchStr nvarchar(max)
set #Str='Users\appu\Documents\Visual Studio 2008\Projects'
set #SearchStr='appu'
SELECT STUFF(#Str, 1, CHARINDEX(#SearchStr+'\', #Str)+LEN(#SearchStr), '')

selecting 0776578969 from database and displaying 0776 578 969 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
trying to display data with space from database (ms-access) eg selecting 0776578969 and displaying 0776 578 969 using access and vb. Help
If you need this in a report or form, then just use custom format.
(in the format setting just go:
#### ### ###
And, in code, you can go:
Format("your value","#### ### ###")
Access is a business application development tool, and such types of string processing and having to use VBA code is not required for common formatting in reports, forms. And even as above shows, for code you don't process using mid$ etc, but use formatting command.
If you are wanting to perform this in MS Access, then you will want to review the Left, Mid and Right function. Here is a sample query that should give you the results you want:
Test Table:
PhoneNumber
776578969
123456789
SELECT Left(test.phonenumber, 3) & " " & Mid(test.phonenumber, 4, 3) & " " & Right(test.phonenumber, 3)
FROM test;
Results:
776 578 969
123 456 789