21

You can get Regular price and Final price of all types of product using below way. Simple Product $regularPrice = $product->getPriceInfo()->getPrice('regular_price')->getValue(); $specialPrice = $product->getPriceInfo()->getPrice('special_price')->getValue(); Configurable product if ($product->getTypeId() == '...


8

// Instance of Object Manager $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of Pricing Helper $priceHelper = $objectManager->create('Magento\Framework\Pricing\Helper\Data'); echo $priceHelper->currency($product->getFinalPrice(), true, false);


8

Helpfull comand to check where we can find 'As low as' grep -rnw '/var/www/html/your magento-directory' -e 'As low as' You can use one of this three methods: Rewrite final_price.phtml Just copy vendor/magento/module-bundle/view/base/templates/product/price/final_price.phtml to: app/design/frontend/YourVendor/YourTheme/Magento_Catalog/product/price/...


6

You need to create your custom module using below code Let say module name Custom_Outofstock So create folder in app/code Create registration.php file at app/code/Custom/Outofstock/registration.php Add below code to it: <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, '...


6

Try this core helper function : // This will show a price with Currency symbol Mage::helper('core')->currency(PRICE_HERE, true, false); Otherwise use number_format : number_format(PRICE_HERE, 2, '.', ''); number_format($products->getPrice(), 2, '.', '') ; The complete code: <?php if($_product->getData('deals_bus_price')) : ?> <?php ...


5

create a object of abstractProduct Block then call the getProductPrice method and pass product object as parameter. see below. $abstractProductBlock = $block->getLayout()->createBlock('\Magento\Catalog\Block\Product\AbstractProduct'); echo $abstractProductBlock->getProductPrice($product); Complete implementation example: <?php $objectManager =...


4

Magento 2 provide functionlity to set custom product price before product add to cart, to archive this you need to used event in your extension. Event which is used here is "checkout_cart_save_before" event. Create file [vendor][Extension]\etc\frontend\event.xml and specify this code for your event. <event name="checkout_cart_save_before"> <...


4

I have tested your code and modified it use below : public function modifyall(Varien_Event_Observer $observer) { $products = $observer->getCollection(); foreach( $products as $product ) { $originalprice = $product->getPrice(); $customprice = $originalprice+ 100; $product->setPrice($...


4

You need to make changes in price-box.js which is placed at /vendor/magento/module-catalog/view/base/web/js/price-box.js Make sure you take this js in your custom theme folder and make changes on line number 22 near priceTemplate: '<span class="price"><%- data.formatted %></span>' Add your custom text after <span class="price"> ...


3

Since you need it based on $_REQUEST data, you need to add the product to the cart first than you can change the price, usually i use it in observer. here's the function code: private function modifyPrice($product_id,$newPrice){ //get quote $quote = Mage::getSingleton('checkout/session')->getQuote(); foreach ($quote->getAllVisibleItems() ...


3

"value" column in catalog_product_entity_decimal for the Product Page and "price" column for the catalog_product_index_price for catalog page. Hope it helps


3

Whatever you do, back up your db first. And yes, you can delete all the rows and keep the ones that have store_id = 0. So this query should solve your problem: DELETE FROM catalog_product_entity_decimal WHERE attribute_id = 75 AND store_id <> 0 But in case I wasn't specific the first time, backup your database. Clear the cache ...


3

In the last version of magento (2.3), the template that holds the final price is: your-magento-directory/vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml to override it, you need to create a file in: app/design/frontend/<YOUR_VENDOR>/<YOUR_THEME>/Magento_ConfigurableProduct/templates/product/price/...


3

Here's how to do it with proper DI: use Magento\Catalog\Api\ProductRepositoryInterface; class Price { /** * @var ProductRepositoryInterface */ protected $productRepository; public function __construct(ProductRepositoryInterface $productRepository) { $this->productRepository = $productRepository; } /** * @...


3

You can get custom product attribute value in final_price.phtml using following code <?php $_product = $block->getPriceType('final_price')->getProduct(); $attvalue = $_product->getCustomAttribute('attribute_id')->getValue(); ?>


2

In Backend, Catalog->Manage Attributes. Check the price attribute and set Use In Layered Navigation option No


2

You can use this module http://www.magentocommerce.com/magento-connect/et-currency-manager.html it will give you the option to cut zero decimals


2

Just created availability, price, cost CSV-updater. Interested in development or contribution, so posting it here. http://lycenok.com/magento-extensions/magento-csv-product-updater.html https://github.com/lycenok/magento_csv_product_updater Regards, Eugene. UPDATE: Remember about the simple solution, implemented in Magento itself. System -> Import/...


2

I don't think that using the SOAP services will get you what you need fast. I mean it will probably work, but it will be really slow for 3k products. Instead try this script. Let's say that your csv has 2 columns. SKU and price. $skuIndex = 0; $priceIndex = 1; $csv = 'path/to/file.csv'; $io = new Varien_Io_File(); //an array to keep the products by price $...


2

Check following function Mage_Tax_Model_Config class::priceIncludesTax(); this function returns true and false base on system -> config -> tax ->calculation setting -> Catalog Prices. you can add condition here by customer group(do not change core file move to local first).


2

That looks like a configurable product. Event 1 is a configurable product with 3 configurations: Adults, 100€ Children, 80€ Children (younger than 6), 0,00€ etc... Same for event 2. More info can be seen in here: https://www.mageplaza.com/kb/how-create-configurable-product-magento-2.html


2

To display/show product price including tax amount, you need to do some configuration settings. 1. Create Tax Rule You need to create tax rules (Sales -> Tax -> Manage Tax Rules). For this, you can refer to different tutorials available over the internet on creating Tax rules. 2. Assign Tax Rule to Product Then, you need to assign the Tax rule to the ...


2

To fetch the Product price in custom module same as listing page using price render block. Add the below function in your custom block class. /** * @param \Magento\Catalog\Model\Product $product * @return string */ public function getProductPrice($product) { $priceRender = $this->getLayout()->getBlock('product.price.render.default') -&...


2

It definitely looks like the price indexer is not working properly. I've checked it on Magento 2.2.6 vanilla and final_price, min_price and max_price have the same value as the price column. The moment I change the price in admin all the values are changed (indexer set to on save). Maybe some extension is messing the indexer? Without access to the code ...


2

Try this, Add the below code in you block <?php namespace Vendor\ModuleName\Block; use Magento\Framework\View\Element\Template; class GetPricce extends Template { ...


2

First you need to override Magento\Catalog\Model\Product using di.xml Path of di.xml: Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">   <type name="Magento\Catalog\Model\Product">     <plugin ...


1

How many store do you have right now? If you have multi store. Please check once have you set the price for that store which store product you are seeing at frontend. Also Please do indexing from magento admin panel.


1

Just replace this code <plugin name="cache_price" type="Vendor\ModuleName\Plugin\Product" sortOrder="1" disabled="true"/> with <plugin name="cache_price" type="Vendor\ModuleName\Plugin\Product" sortOrder="1" /> You have apply disabled="true" code in di.xml


1

Within the 2.2.0-dev 'app/bootstrap.php' there are below lines. The precision sets the number of decimal places being used by php so setting this to 2 should change the decimal places used: /* Adjustment of precision value for several versions of PHP */ ini_set('precision', 17); ini_set('serialize_precision', 17); Change to: /* Adjustment of precision ...


1

First off, I would suggest updating to Magento 2.1.3 first, since this changes some fundamental ways on how products are saved. Secondly, you need to catch a hook on where the product is saved. An event or a plugin (interceptor) could be used for this. You could add a plugin before the save method of the product repository: public function beforeSave( ...


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