New answers tagged

0

Here price hide when guest user login and price show after customer login. app\code\Vendorename\Modulename\etc\frontend di.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"...


0

Completely hide price from the store app\code\Vendorename\Modulename\etc\frontend di.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\...


2

You can display a discount price in minicart by setting customer group price from admin. Catalog -> Products -> Select and edit your product Click on Advanced Pricing and set customer group price as attached image. It will display the discount price of products in minicart. Hope it will help you!


0

In Catalog > Products, edit a product and click on advanced pricing. From there, you can enter the discounted price in special price, and click save, and your original price and discounted price will show. If you want to add any slashes or make it look different you will have to style with your css or less.


1

Try this code <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** @var $block \Magento\Catalog\Block\Product\View */ ?> <?php $_product = $block->getProduct(); ?> <?php $buttonTitle = __('Add to Cart'); ?> <?php if ($_product->isSaleable()) :?> <div class="box-...


0

You can use this echo $block->getSaleableItem()->getResource()->getAttribute('attribute_name')->getFrontend()->getValue($block->getSaleableItem());


0

We have a site with 300k products, and I tried quite a few extensions for loading our data. The best one I've found is from Wyomind - Mass Product Import and Export ($210). https://www.wyomind.com/mass-product-update-import-magento.html It handles every loading scenario I've needed, and I just checked - it does tiered pricing too. One feature it has is to ...


0

You can use \Magento\Catalog\Model\ProductRepository to get Special Price. To get the special price you can do it a couple of ways, this one being by product ID: /** @var \Magento\Catalog\Model\ProductRepository $productRepository */ $this->_productRepository = $productRepository; $product = $this->_productRepository->getById($id); <-- get the ...


0

Get product special price // get product regular price $prd_regular_pice = $product->getPrice(); //get product final price $prd_final_pice = $product->getFinalPrice(); // special price if($prd_regular_pice != $prd_final_pice) { $special price = $prd_final_pice; } else { $special price = "No Special Price" } // get special price ...


0

We are using 3rd party product importer and found $0 for configurable but showing the correct price for option selection. After saving one of the child products manually in admin, configurable started showing the correct price of $42.95 in the frontend.


0

As per the above issue, I have used the below module in the M2 site and the tax rounding issue sorted. https://github.com/meanbee/magento2-tax-rounding It's working for me. Thanks


0

In overrided by your module file: vendor/magento/module-checkout/Block/Cart/Item/Renderer.php add new method to get full product data by its id: /** * Get item product * * @return \Magento\Catalog\Model\ProductRepository * @codeCoverageIgnore */ public function getProductFull($id) { return $this->productRepository->getById($id); } Edit app/...


Top 50 recent answers are included