Skip to content

How to pass storeUrl to default Magento oauth script?

I’m trying to create my first Magento 2 extension and integration and I’ve been following the guide in their docs here. All good so far, I’ve completed the auth handshake, stored all the required keys for api requests and can make requests back to my extension fine. Looking at the OauthClien…

How to decrease file size upload for non-admin users?

My site allows upload file size of up to 256 MB but I would like to limit my site users to only 1 MB max and keep the maximum 256 MB for the admins. All solutions I found only show how to increase the upload limit, but not decrease for specific roles. I tried the following but it didn’t work:

php substr() and currency symbol strange output

This is a little bit rude code and I am having this output for this simple string formatting sample. $originalValue is equal for example to “$50.00”; $currency is setted correctly to “$”; $value should be “50.00” but this is the result of the above dd() is: b”£50.00&#…

How should I write the rule so that it looks like this?

I’m trying to figure out how to convert url. It leads to the index page. the constant I define define(“URL_PAGE”, “page.php?p=”); link: <a class=”menu-link” href=”‘.BASE_URL.URL_PAGE.$row1[‘page_slug’].’”>’; .htaccess RewriteR…

Question for PHP Time Calculator Based on Distance

I’m working on a project where I have to calculate the hours and minutes a train ride will take based on distance (in miles/hour), stops taken (5 minutes added per stop), and weather (Good weather …