payu user defined fields max length - payu

I am currently working on payu integration to my website, Here I need to send 256 characters (alphanumeric) in udf1, Is this possible ? what is the max length of these user defined fields? where can I get the proper demo and documentation for payu, Currently I am referring this.

250 is the max length for payu user defined fields

Related

Get All Categories from Woocommerce using REST API

I am trying to retrieve all categories using Woocommerce rest API.
here is my URL
https://wapi.sriyagcommerce.com//wp-json/wc/v2/products/categories?consumer_key=ck&consumer_secret=cs&per_page=100
while using above url I am getting Error.
code "rest_invalid_param"
message "Invalid parameter(s): per_page"
data
status 400
params
per_page "per_page must be between 1 (inclusive) and 100 (inclusive)"
I want to increase per page limit. I already have done with products by using below code and want to do the same with categories
function maximum_api_filter($query_params) {
$query_params['per_page']["maximum"]=100000;
return $query_params;
}
add_filter('rest_product_collection_params', 'maximum_api_filter');
I must've commented very early in the morning
There is NO Way of increasing the size per page past a 100 Its a limit set by the API team you cannot exceed a 100.
Now I do not know what Your using to develop, But i'd consider using a Collection and just pull the first 100, Index the Page pull a 100 Combine Collections and so on.
But as for Getting all 300 in one instance from one API call that cannot be done sadly.
I also face the same problem.
You couldn't increase the list size. Maximum limit in Woocommerce is 100.
You can follow bellow URL pattern to fetch 100 records,
https://www.yourcompany.com/wp-json/wc/v2/products?per_page=100
You can also specify pages with the ?page parameter
https://www.yourcompany.com/wp-json/wc/v2/products?per_page=100&page=2
You can find total number of pages and records from
the X-WP-TotalPages and X-WP-Total HTTP headers.
After getting total page from X-WP-TotalPages you can execute a loop with per_page=100&page=${pageNumber} and increase pageNumber dynamically.
By this approach you can find all records.

Using MessageAttributes in AWS SNS Post request

I am trying to use the MessageAttributes parameter in AWS SNS POST request. This is to customize the Sender ID (by AWS.SNS.SMS.SenderID). I am trying for Germany phone number and hence is allowed to customize the Sender ID. Can any one help me with the correct syntax?
Thanks,
Subhajit
You need to send 3 key/value pairs for each attribute:
MessageAttributes.entry.${index}.Name=${attributeName}&
MessageAttributes.entry.${index}.Value.DataType=String&
MessageAttributes.entry.${index}.Value.StringValue=${attributeValue}
${index} is the numerical index of each attribute, starting with 1
On the second line you need to specify the type of the value. Most common cases are String.
The third line is the actual value. You can see more information in the link above, I have only used strings and StringValue.
All the values need to be url-encoded for obvious reasons.
I was able to solve it using the following:
MessageAttributes.entry.N.Name (key)
MessageAttributes.entry.N.Value (value)

Max for woocommerce attribute VALUES

I am apparently exceeding the maximum characters allowed for the attribute VALUES in woocommerce, and I can't seem to find what the max actually is.
Clients will ultimately be adding products once I do the original set up, so it adding them as custom variables is something I want to avoid.
I also don't want to have to mess with functions; I'm trying to limit the actual values to less then the max.
Thanks in advance :)
The attribute Values will be saved in table (wp)_postmeta,
in the meta_value column (meta_key is _product_attributes).
This column is from "Longtext" type.
Longtext from the MYSQL Doc.:
"A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. The effective maximum length of LONGTEXT columns also depends on the configured maximum packet size in the client/server protocol and available memory."
Link to MYSQL Doc.
Woocommerce saves more than this Value in the field.
Here is an example:
a:1:{s:4:"attr";a:6:{s:4:"name";s:4:"attr";s:5:"value";s:5:"1 | 2
";s:8:"position";i:0;s:10:"is_visible";
i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}}
At the End of the first line you see 1 | 2, this are my test attribute Values.
I had same problem and solved it today so I'm gonna say what I done if someone will search for it again. So you can go to your wp-content / woocommerce / includes / wc-attribute-functions.php and just ctrl + f for 28. There is the max number for your attribute slug. If you want find another places like not slug, but name and etc. just download whole woocommerce folder and search it with editor witch allows you to search for multiple files. But also I'm pretty sure your code changes will be wiped out when you update woocommerce.

Different results with and without ga:pagePath dimension

I use the following query parameters in Google Analytics:
start-date=2017-10-01
end-date=2017-10-01
metrics=ga:users
When I filter by ga:pagePath==/charity/ the result is 100.
When I filter by ga:pagePath=~/charity/ the result is 139.
When I filter by ga:pagePath=~/charity/;ga:pagePath!=/charity/ The result for some reason is 71. How is it possible?
Moreover, if I add the ga:pagePath dimension when I filter by ga:pagePath=~/charity/ I can see that the results add up to way more than 139. In fact, it shows that users for /charity is 100 and the rest of URLs add up to 137 (counted them manually). Could someone, please, help me to understand what am I missing here?
I wager that at least part of the problem is that you query a user scope metric and filter by a hit based dimension.
A user can see multiple pages that contain "charity" in the url, so the total from all pages is more than total users, e.g, if one user has seen page /charity/a and page charity/b the rows would add to two users, but the absolute total is just the single person.

Node position in list

how to get the current node position in the list?
Is there any access like $node->position?
I'm using Drupal 7. Thanks
It would help if you offered more information on what you are doing. You could add a select field called weight to the content type that would contain a range of numbers like -100 to 100 and then create a view that pulls in content of that type and then add a sort criteria based on the select field "weight". But we would need more information on what you are doing in order to give you a more accurate response.

Resources