7

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState = $objectManager->get('\Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku'); $qty = $StockState->execute($_product->getSku()); echo ($qty[0]['qty']); ?> You can get only the saleable quantity by the following above code.


3

To change the title of More Choices You have to override the /vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml to in your theme /app/design/frontend/[Theme_Vendor]/[Theme]/Magento_Catalog/templates/product/list/items.phtml In this file replace find the below line of code $title = __('More Choices:'); And replace it ...


3

Override the below file catalog_product_view_type_simple.xml <referenceBlock name="product.info.price" remove="false" /> Use the above code to show the price only in the simple product on product view page


3

I got solutions for my problem. Just create catalog_product_view_type_simple.xml and use this code below: ... <referenceBlock name="product.info.addtocart"> <block class="Magento\Catalog\Block\Product\View" name="product.info.addto" as="addto" template="Magento_Catalog::product/view/addto.phtml"/> </referenceBlock> ...


2

Just add below code to catalog_product_view.xml file for the simple and configurable product: For Simple Product <referenceBlock name="product.info.addtocart"> <block class="Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist" name="view.addto.wishlist" template="Magento_Catalog::product/view/addto/wishlist.phtml" /> </...


1

Use the following code :- namespace Vendor\Module\ModelName; use Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku; class ClassName { private $getSalableQuantityDataBySku; public function __construct( GetSalableQuantityDataBySku $getSalableQuantityDataBySku ) { $this->getSalableQuantityDataBySku = $...


1

Try the below code to get salable QTY. <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState = $objectManager->get('\Magento\InventorySalesApi\Api\GetProductSalableQtyInterface'); $qty = $StockState->execute($_product->getSku(), 2); ?> Hope this will help you.


1

Can you try this <move element="product.addto.wishlist" destination="product.info.addtocart.additional" after="product.info.addtocart" />


1

I have done this using below steps: 1. add a function in the block : vendor/module_name/Block/Index/Index.php public function getProductPricetoHtml( \Magento\Catalog\Model\Product $product, $priceType = null ) { $priceRender = $this->getLayout()->getBlock('product.price.render.default'); $price = ''; if ($...


1

In your theme, you should extend catalog.xml and inside him put: <catalog_product_view> <reference name="product.info"> <block type="<your_class_block>" name="<your_name>" template="<your_template_file>"/> </reference> </catalog_product_view> But, if you don't want product.info you can add a ...


Only top voted, non community-wiki answers of a minimum length are eligible