Custom catalog module to read, delete and update specific attributes and create new products. Also, this module opens some rest api endpoints to read and update products
- Include this git repository to composer.json
"repositories": [
{
"url": "https://github.com/mamreezaa/module-custom-catalog.git",
"type": "git"
}
],
- Download module
composer require ounass/module-custom-catalog dev-main
- Install
bin/magento setup:upgrade
bin/magento setup:di:compile
- Start the consumers
bin/magento queue:consumers:start CustomCatalogProductUpdate
bin/magento queue:consumers:start CustomCatalogDeadMessage
- Product Grid with vpn and copy_write_info added (including filter)
- CRUD operation for products (store level)
- Rest api for listing products by vpn
- Rest api for asynchronously updates products for with attributes vpn and copy_write_info
- Dead message exchange/queue for failed or timed out messages.
curl --location --request GET 'http://{base_url}/rest/default/V1/product/getByVPN/620317' \
--header 'Authorization: Bearer {token}'
curl --location --request PUT 'http://{base_url}/rest/default/V1/product/update' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"product": {
"entity_id": 2050,
"copy_write_info": "AR",
"vpn": "12345"
}
}'
{
"request_uuid": "95bafa0b-0a20-4dc0-9010-91d8870af40e",
"product": {
"entity_id": "2050",
"vpn": "1234",
"copy_write_info": "deafult"
},
"store_id": 1
}