Skip to content

Instantly share code, notes, and snippets.

View mrkhoa99's full-sized avatar
🎯
Don't repeat yourself

Mr Khoa mrkhoa99

🎯
Don't repeat yourself
View GitHub Profile
@mrkhoa99
mrkhoa99 / Search using REST APIs
Last active October 7, 2017 15:10
Search using REST APIs
Should Read here first:
http://devdocs.magento.com/guides/v2.2/rest/performing-searches.html
Examples:
1) Quick Search:
http://mage217.loc/rest/V1/search?searchCriteria[requestName]=quick_search_container
&searchCriteria[filterGroups][0][filters][0][field]=search_term
&searchCriteria[filterGroups][0][filters][0][value]=test
@mrkhoa99
mrkhoa99 / Get response time with curl (MacOs)
Last active March 30, 2018 09:21
Get response time with curl
curl -o /dev/null -s -w {time_connect}:%{time_starttransfer}:%{time_total}\\n <api_url>
@mrkhoa99
mrkhoa99 / Add new static type customer attribute Magento 2
Last active April 2, 2025 18:54
Add new static type customer attribute Magento 2
#File app/code/Vendor/CustomerDemo/Setup/Patch/Data/CustomerAgeAttribute.php
<?php
namespace Vendor\CustomerDemo\Setup\Patch\Data;
use Magento\Customer\Model\Customer;
use Magento\Customer\Setup\CustomerSetup;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Framework\Setup\Patch\DataPatchInterface;