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 = $...
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\...
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]/...
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 ...
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\...
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\...
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\...
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;
...
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" />
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,
...
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) {
...
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;}
}
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="<...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
product-view-page × 19magento2 × 9
magento2.3 × 3
product-images × 3
product-detail-page × 3
layout × 2
xml × 2
related-products × 2
magento-1.9 × 1
magento-2.1 × 1
blocks × 1
extensions × 1
frontend × 1
cache × 1
ajax × 1
stock × 1
product-view × 1
full-page-cache × 1
magento2.3.2 × 1
bundled-product × 1
simple-product × 1
magento2.3.0 × 1
grouped-products × 1
magento2.4.2 × 1
date × 1