9 votes
Accepted

How to get salable qty in magento 2.3.3?

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState = $objectManager->get('\Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku'); $qty = $...
Haerriz's user avatar
  • 681
4 votes
Accepted

Move "Add to Wishlist" Button after "Add to Cart" in Product View

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\...
Kevinzie's user avatar
  • 551
3 votes
Accepted

Changing Title of Crossell's and Gaps Products Block

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]/...
Kishor Thummar's user avatar
3 votes
Accepted

How to show price in simple product on product view page?

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 ...
Haerriz's user avatar
  • 681
3 votes

Move "Add to Wishlist" Button after "Add to Cart" in Product View

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\...
Rishi Ranjan's user avatar
2 votes

How to get salable qty in magento 2.3.3?

Try the below code to get salable QTY. <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState = $objectManager->get('\Magento\InventorySalesApi\Api\...
MK Patel's user avatar
  • 422
1 vote

How to flush/clean cache programmatically in Magento 2.4 for category/product page

You can use this code : <?php namespace Vendor\Extension\Block; use Magento\Framework\App\PageCache\Version; use Magento\Framework\App\Cache\TypeListInterface; use Magento\Framework\App\Cache\...
Dhiren Vasoya's user avatar
1 vote

How to get salable qty in magento 2.3.3?

Use the following code :- namespace Vendor\Module\ModelName; use Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku; class ClassName { private $getSalableQuantityDataBySku; ...
Ronak Rathod's user avatar
  • 6,259
1 vote

Move "Add to Wishlist" Button after "Add to Cart" in Product View

Can you try this <move element="product.addto.wishlist" destination="product.info.addtocart.additional" after="product.info.addtocart" />
Shorabh's user avatar
  • 1,510
1 vote

How to change product image on swatch selection on related product on product view page in Magento 2?

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, ...
Vinod Kumar Clix's user avatar
1 vote

Magento 2 how to restrict previous date in datepicker , for frontend detail page custom options

In your script add the following $customId = <?php echo $product->getCustomId();?> <script> require([ 'jquery', 'mage/calendar' ], function($, calendar) { ...
aravind's user avatar
  • 1,824
1 vote

In Magento 2 how to print Product view page?

i got solution: we can write below code in our CSS file we can hide header footer in window.print(): @media print { #header,#footer {display: none;} }
Radha Krishna's user avatar
1 vote

Create Custom block on Product View with form

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="<...
Max Souza's user avatar

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