If you want to work with REST API in magento 2, It can be easiy done using Swagger. Magento 2 has alredy bundled with Swagger.
You can access it by:
http://<magento_2_Root>/swagger
You will see a screen like:
If you want to work with REST API in magento 2, It can be easiy done using Swagger. Magento 2 has alredy bundled with Swagger.
You can access it by:
http://<magento_2_Root>/swagger
You will see a screen like:
If a product having custom option
, its SKU is created on the fly.
If you look at file.
MagentoRoot\vendor\magento\module-catalog\Model\Product\Type\AbstractType.php
You will find a function getOptionSku
, which is responsible for creating SKU.
If you want to remove custom option SKU to main product’s SKU, You can change to
**$sku**
From
**$sku .= $skuDelimiter . $optionSku;**
Where
$sku = SKU of product
$skuDelimiter = –
$optionSku = SKU of custom option of product
You can change as per your requirement.
**Note:** Never edit core files, you need a proper Model overriding. For test purpose you can check by putting die
below this sku generation code and add a product from front.
For remove Description Tab and adding description below short description use below code at :
app/design/frontend/Namespace/Theme/Magento_Catalog/layout/catalog_product_view.xml
1 2 3 4 5 6 7 8 9 10 11 12 |
<referenceContainer name="product.info.main"> <referenceBlock name="product.info.description" remove="true"/> <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description.custom" template="product/view/attribute.phtml" group="detailed_info"> <arguments> <argument name="at_call" xsi:type="string">getDescription</argument> <argument name="at_code" xsi:type="string">description</argument> <argument name="css_class" xsi:type="string">description</argument> <argument name="at_label" xsi:type="string">none</argument> <argument name="title" translate="true" xsi:type="string">Details</argument> </arguments> </block> </referenceContainer> |
Before Changes:
After Changes: