Categories
Mastering Development

Getting list of ids of enabled checkboxes angular

I have a table in which I have particular column as checkboxes. I have assigned a empty list. So what I want is that I want the ids of the rows of the enabled checkboxes. Say for example if the checkboxes are enabled in id 4 and 5 then the list should be [4,5] Sample […]

Categories
CMS Magento Mastering Development

How to pass the card details for the Magento API [POST]: V1/carts/mine/payment-information for the payment method stripe_payments_checkout_card

I have an iOS native app which communicates through Magento Rest APIs with my Magento Store, I would like to know how to pass the card details (Token, CVV, Exp Year, Exp Month, Last 4) in JSON format for the payment method "method":"stripe_payments_checkout_card" in the Magento API: [POST] V1/carts/mine/payment-information Note: I use the Stripe Official […]

Categories
CMS Magento Mastering Development

How to Recieve array in request in Custom REST API in Magento 2

I am working on a custom API in which user will pass the request like below in JSON. { "cartItem": [ { "sku": "11223344", "qty": 1 }, { "sku": "55667788", "qty": 1 } ] } I tried to get it done like this. interface CartItemInterface extends CustomAttributesDataInterface { const CART_ITEM = ‘cartItem’; /** * Return […]

Categories
CMS Magento Mastering Development

Shipment Extension Attributes

I’m trying to set shipment extension attributes with the following XML; <extension_attributes for="Magento\Sales\Api\Data\ShipmentInterface"> <attribute code="order_warehouse" /> </extension_attributes> When I post the following to it via; /rest/V1/order/120493/ship { "items": [ { "order_item_id": 718364, "qty": 1 } ], "notify": false, "arguments": { "extension_attributes": { "order_warehouse": "WAREHOUSE_STOCK" } } } I’m getting the following error; "message": "Property \"OrderWarehouse\" […]

Categories
CMS Magento Mastering Development

Where to find Table for data getPreconfiguredValues

I notice that when I try to update a custom value in Checkout/Cart the custom options selected is correct and is updated. Then when I visit the checkout/cart/configure/id/{quoteid}/product_id/{productid}/ it’s still displaying the old Custom Option I selected before I did the update which is not correct. Now I’ve traced the code and found this namespace […]

Categories
CMS Magento Mastering Development

Where to find Table for data getPreconfiguredValues

I notice that when I try to update a custom value in Checkout/Cart the custom options selected is correct and is updated. Then when I visit the checkout/cart/configure/id/{quoteid}/product_id/{productid}/ it’s still displaying the old Custom Option I selected before I did the update which is not correct. Now I’ve traced the code and found this namespace […]

Categories
CMS Magento Mastering Development

Where to find Table for data getPreconfiguredValues

I notice that when I try to update a custom value in Checkout/Cart the custom options selected is correct and is updated. Then when I visit the checkout/cart/configure/id/{quoteid}/product_id/{productid}/ it’s still displaying the old Custom Option I selected before I did the update which is not correct. Now I’ve traced the code and found this namespace […]

Categories
CMS Magento Mastering Development

Magento 2: How to add a tracking number to an order using REST API

I use the following code to add a tracking number to an order: $url = ‘https://xxxxx/rest/V1/order/514/ship’; $authorization = "Authorization: Bearer ".$json; //I get $json in other part of the code, this work fine $data = [ "items" => [ [ "order_item_id" => 614, "qty" => 1 ] ], "tracks" => [ "track_number" =>"1111111111", "title" => […]

Categories
CMS Mastering Development

LineItems not showing in CMS

I’m scratching my head. My orders are shown perfectly except for one product. I have no idea why so I looked at the Order object before saving and I can’t seem to figure out why he won’t show the lineitems in the CMS. This is my object: { "number": "17092020135106598", "reference": "They Were Soldiers", "couponCode": […]

Categories
CMS Magento Mastering Development

Magento 2 API invoice items showing as double

For some reason on a invoice more QTY is returned than what exists in the items array. It seems to only do this on configurable products however how should one handle this from the API? Full example: https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-create-invoice.html Short part in question: { "base_discount_tax_compensation_amount": 0, "base_price": 52, "base_price_incl_tax": 52, "base_row_total": 52, "base_row_total_incl_tax": 52, "base_tax_amount": 0, […]