31 votes
Accepted

Magento 2 : How to get Final price & Original price of all types of product

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(); $...
user avatar
  • 5,848
17 votes

Magento 2 display old price AND special price in category list

Found solution here : https://github.com/magento/magento2/issues/7624 Copy final_price.phtml from Vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml to ...
user avatar
  • 681
11 votes
Accepted

How to check if product in cart is on sale (has a special price)?

You can do this by below code: if($product->getPrice()>$product->getFinalPrice()): // product in sales endif; If want only basic of Special price,Then you can try the below: $...
user avatar
  • 75.4k
9 votes
Accepted

Magento 2 - Unset Special Price programmatically

Saving the price and forcibly update the product attribute using the resource model worked in my situtation: $product->setSpecialPrice(null); $product->getResource()->saveAttribute($product, ...
user avatar
  • 11.6k
9 votes

Magento 2 - get special price of product by product id or sku

Use \Magento\Catalog\Model\ProductRepository class to get the special price of the product protected $_productRepository; public function __construct( ... \Magento\Catalog\Model\...
user avatar
  • 21.5k
8 votes

magento2 - how to create Scheduled Changes (Magento_CatalogStaging module) of product programmatically?

like Igor already mention you can try with the following. First, create scheduled update instance and set name, start and end time. /** * @var \Magento\Staging\Api\UpdateRepositoryInterface */ ...
user avatar
  • 81
7 votes
Accepted

Magento2: Attribute News to date, News from date , special from date and special to date doesn't show in admin

Magento intentionally hid these values in Enterprise Edition (see vendor/magento/module-catalog-staging/etc/adminhtml/di.xml). <type name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\...
user avatar
  • 1,234
6 votes

Use final price in addFieldToFilter

Well the field for "final price" has code final_price in Magento Eav product table. First you have to add final price to the collection as below: $collection = Mage::getResourceModel('catalog/...
user avatar
  • 1,984
5 votes

In the Magento Difference between Price, Group Price, Special Price, Tier Price, Display Actual Price and Manufacturer's Suggested Retail Price

Price - This is the regular price for a product Group Price - This is the price a group (e.g whole sale) (This will be displayed instead of price) Special price - This is a Promotional price, which ...
user avatar
  • 616
4 votes

How to add special price for customer group in admin

I would suggest using: Promotions > Catalog Price Rule > Add New Rule in Magento admin panel there you can select customer group, date from when to when the discount applies and can make BIG ...
user avatar
  • 286
4 votes

Special Price With Configurable And Simple Products

Magento completely ignores prices of associated products in the configurable product type. You can specify a price difference for each associated product within a configurable product, but the base ...
user avatar
4 votes

Reindexing option not available in magento 2.0

In production mode Magento should be reindexed by a cronjob, see the documentation for further explanation: http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html. ...
user avatar
  • 1,267
4 votes

How to display Special Price end date on front end

On Product detail page or Category list page, You can use following code to display special price end date. <?php // check if product has special if($_product->getSpecialPrice()){ // get ...
user avatar
  • 7,346
4 votes
Accepted

List all products with special price

This is how I did it $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $visibleProducts = $objectManager->create('\Magento\Catalog\Model\Product\Visibility')->...
user avatar
  • 1,595
4 votes

Get product FINAL price without loading entire product

"a more efficient way" is to use product collcections where final price is already add to. Some numbers here: What is faster - getting raw attribute value or use collection? Using ->addFinalPrice()...
user avatar
  • 11.5k
4 votes
Accepted

Programatically get special price products that are active by checking the end date?

Here is complete search criteria with 4 filters: $withSpecialPrice - a filter for products with a special price greater then 0 $withVisibleStatus - a filter for product with a visible status (enabled ...
user avatar
4 votes
Accepted

Problem with Special Price Date in Magento2

Have you set your locale to any other than en_US? Try editing the admin user you are using, set the locale for that user to en_US and try setting this again. There is a bug with the datepicker I ...
user avatar
4 votes
Accepted

Magento 2 get special price product collection

create your own block file and get collection below way.. <?php namespace Vendor\SaleProducts\Block\Home; use Magento\Catalog\Api\CategoryRepositoryInterface; class SaleList extends ...
user avatar
  • 5,094
4 votes

Error showing special prices when changing store view - Magento 2.3.1

Hey Please check in catalog_product_index_price table with your entity_id. Like SELECT * FROM catalog_product_index_price WHERE entity_id =432 LIMIT 0 , 30 and see what price is there.
user avatar
3 votes
Accepted

Price of bottle shown as price of one shot

$coreHelper = Mage::helper('core'); $shotPrice = $_product->getFinalPrice() / ($volume * 25); $displayShotPrice = $coreHelper->formatPrice($shotPrice); now you just have to print $...
user avatar
  • 195k
3 votes
Accepted

Magento Product Collection less then the Original price

$categoryIds = array(469);//category id $products = Mage::getResourceModel('catalog/product_collection') ->addCategoryFilter(Mage::getModel('catalog/category')->load($categoryIds)); $...
user avatar
3 votes

How can I show the amount saved in magento 2

I ran into the same issue on category and search results pages on Magento 2. Here's what I eventually figured out. Hope it helps! (Note: this all falls within the foreach loop which iterates through ...
user avatar
  • 73
3 votes

How to display Special Price end date on front end

You can use $pro = Mage::getModel("catalog/product")->load(PRODUCT_ID); echo $pro->getSpecialToDate(); Change PRODUCT_ID with id of product For formatting date $dt = $pro->...
user avatar
  • 4,626
3 votes
Accepted

Magento 2 - get special price of product by product id or sku

use Magento/Catalog/Model/ProductFactory to load product, and get price information from the model Code is like: $specialPrice = $this->productFactory()->create()->load($id)->...
user avatar
  • 195
3 votes

How can you set the customer group pricing for specific logged in ids as 50 percent discount for all products in magento2?

You can create a catalog price rule and select the customer group who will be eligible for the discount. In conditions tab you can select the condition for which product this discount will be applied....
user avatar
  • 8,548
3 votes
Accepted

apply catalog promotion rule on tier prices and special prices in magento 2

Native magento doesn't support applying catalog promotion rule on tier prices and special prices but we can achieve this by extending some of the core files in magento. You can find the ...
user avatar
3 votes
Accepted

Magento2.2.5 show original price when configurable product is part of catalog price rule

Copy this file vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml into your theme/module and remove the following condition, !$block->isProductList() &...
user avatar
3 votes

I am getting Invalid input datetime format of value '11/22/2018' when setting special price in magento 2.3.1

This is an official bug. See Magento / GitHub thread here! @jcdennen shows a temporary fix until Magento fix it by modifying the Timezone.php file and removing am and adding a 0 in $date .= " 0:00am" ...
user avatar
  • 41
3 votes
Accepted

How to add a label to simple & Bundle product price?

For Simple /vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml override on below path /app/design/frontend/theme/Magento_Catalog/templates/product/price/final_price....
user avatar
  • 2,411
2 votes
Accepted

Catalog Price Rules applied to special_price

Here is i have found solution after deep analysis. you can override model app\code\core\Mage\CatalogRule\Model\Action\Index\Refresh.php <global> <models> <catalogrule> ...
user avatar
  • 3,955

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