Create a Cart Price Rule programmatically via Magento 2’s REST API

1. API Endpoint Use the following endpoint to create a cart price rule: bash Copy code POST /V1/salesRules 2. Request Payload Here’s an example of the JSON payload to create a cart price rule: json Copy code { “rule”: { “name”: “Buy 3 Get Discount”, “description”: “Discount applied when purchasing 3 specific items”, “is_active”: true,… Continue reading Create a Cart Price Rule programmatically via Magento 2’s REST API

Published
Categorized as Magento

How to set a discount in Magento2

Step 1: Create a New Shopping Cart Price Rule Log in to the Magento 2 Admin Panel. Go to Marketing > Promotions > Cart Price Rules. Click Add New Rule. Step 2: Configure Rule Information Rule Information: Rule Name: Enter a descriptive name (e.g., “Buy 3 Get Discount”). Description: Optionally, describe the rule for internal… Continue reading How to set a discount in Magento2

Published
Categorized as Magento

create a product in Magento without making it visible on the frontend?

To create a product in Magento without displaying it on the frontend, you can set the product’s visibility attribute to “Not Visible Individually.” Here’s how to do it: Go to the Magento Admin panel. Navigate to Catalog > Products. Click on Add Product to create a new product, or edit an existing one. In the… Continue reading create a product in Magento without making it visible on the frontend?

Change Product by Type in Magento 2

This can be achieved exclusively through the database, either manually or via an SQL query. To perform a bulk change of product types using SQL in Magento 2, follow these steps: Log in to phpMyAdmin. Navigate to the SQL tab and enter the following command: UPDATE catalog_product_entity SET type_id=”simple” WHERE type_id = “downloadable”; This command… Continue reading Change Product by Type in Magento 2

Types of products in Magento2

Simple Product Configurable Product Virtual Product Grouped Product Bundle Product Downloadable Product Type 1: Simple Product Explanation: Simple Product is the most popular product type of a store. In Magento, it is also defined as its name, which means that this kind of product is sold in each single item ( non-variation). Every single product… Continue reading Types of products in Magento2

The Difference Between a Simple and Configurable Product in Magento 2

When adding a simple product in Magento, it’s linked to one SKU and doesn’t have different versions. On the other hand, a Magento 2 configurable product is connected to a group of several simple products. Each variation is made through a specific attribute in Magento and is linked to its own SKU. These choices show… Continue reading The Difference Between a Simple and Configurable Product in Magento 2

THINGS TO REMEMBER on the product types in magento2

Although Simple Product and Virtual Product all belong to grouped product, they don not have custom option, so you should notice when selecting products for grouped product The grouped products in Magento 2 has the option to buy ALL or just one of the set while the bundle products you must buy ALL not buy… Continue reading THINGS TO REMEMBER on the product types in magento2

Custom and basic RMA table infrastructure

Update API Data { rma_id customer_id: dealer_id: status: order_id: po_number: memo: pdf: items:{ { product_id: qty: }, { product_id: qty: } } Create API Data { customer_id: dealer_id: status: order_id: po_number: memo: pdf: items:{ { product_id: qty: }, { product_id: qty: } } Two tables has bee created jj_rma and jj_rma_items. Main table should contain… Continue reading Custom and basic RMA table infrastructure

Option to delete customers account from the Myaccount

A delete button has been placed on the account custom template on the extension JJ_Account. On the delete a controller action is called on the Ajax method. $(document).on(‘click’,’.delete-contact’, function () { var email = $(this).data(“email”); swal.fire({ title: “Are you sure?”, text: “Do you want to delete?”, icon: “warning”, showCancelButton: true, confirmButtonColor: ‘#9FC33A’, cancelButtonColor: ‘#9FC33A’, confirmButtonText:’Yes’,… Continue reading Option to delete customers account from the Myaccount

Create a custom field on the checkout shipping method page

On the checkout_index_index.xml <item name=”shipping-step” xsi:type=”array”> <item name=”children” xsi:type=”array”> <item name=”shippingAddress” xsi:type=”array”> <item name=”children” xsi:type=”array”> <item name=”shippingAdditional” xsi:type=”array”> <item name=”component” xsi:type=”string”>uiComponent</item> <item name=”displayArea” xsi:type=”string”>shippingAdditional</item> <item name=”children” xsi:type=”array”> <item name=”additional_block” xsi:type=”array”> <item name=”component” xsi:type=”string”>JJ_Checkoutupdate/js/view/custom-field</item> </item> </item> </item> </item> </item> </item> </item> web->template folder (custom-field.html) <div class=”form-shipping-addres”> <div class=”field memo” style=”padding-bottom: 20px; font-size:16px;”> <label class=”label” for=”memo”> <span>Memo</span>… Continue reading Create a custom field on the checkout shipping method page