Override the following file from the following path `vendor/magento/module-catalog/view/base/web/js/price-utils.js` then change the value of precision on line 38 as the following changes:
Iam a Workforce management analyst in Firstsource Solutions Ltd in Bengaluru. As a WFM Analyst, I am the responsible to check and create each and evey schedule assigned in the operations for the business line. This blog explains about Magento only.
How we will remove the decimal points from the price in Magento2 website?
How to change the order status from COMPLETED TO CLOSED in Magento?
To Translate the words in Magento:
How can i Import all categories into Magento Site ?
How to Import all Categories into Magento website
To import all categories and products to your Magento website, we need to follow the following instructions.
- Create all categories and create one product on your Magento website
- Then export the data and keep that file with you.
- Now arrange the data which you want to import into the website, that total has to be arranged in the format which like your exported data.
- After arranging you can easily import the data into your Magento website.
Note: After import the data, you need to make reindex.
How to redirect my Magento website from HTTP to HTTPS ?
To redirect a Magento website from HTTP to HTTPS, I think which Magento version you are using is not an important one.
You just follow these following steps:
- Your host/PHPMyAdmin
- Select your database from the existing
- Find for the table `core_config_data` in that
- Now, change the secured and unsecured URLs here, like https://www.domain.com/
New order confirmation email is not being sent on Magento website
We have 2 methods to send the confirmation emails from our Magento 1 website.
- Using Cron
- Avoiding Cron
If you want to avoid the Cron :
Open the file order.php file from the following path:
app/code/core/Mage/Sales/Model/Order.php
Line#1356,1450
Change the following
//$mailer->setQueue($emailQueue)->send();
to the following:
$mailer-> send();
In the following path `app/design/frontend/base/default/template/checkout/success.phtml`:
add the following line Top success page for sending mail direct
$order = Mage::getModel('sales/order');
$incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$order->loadByIncrementId($incrementId);
try{
$order->sendNewOrderEmail();
} catch (Exception $ex) {
echo "Email Not Sent...";
}
$customer = Mage::getSingleton('customer/session')->getCustomer();
$email = $customer->getEmail();
//End Email Sending
Magento 2: How to remove decimal points from the price
You need to override vendor/magento/module-catalog/view/base/web/js/price-utils.js and change the value of precision on line 38:
from
var precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision,
to
var precision = 0
Magento2: How to get list of category's dropdown attributes?
Let's say that `$category` is the instance of the current category;
$collection = $category->getProductCollection()->addAttributeToSelect(['manufacturer', 'color']);
$manufacturers = [];
$colors = [];
foreach ($collection as $product) {
$manufacturer = $product->getData('manufacturer');
if ($manufacturer && !isset($manufacturers[$manufacturer])) {
$manufacturers[$manufacturer] = $product->getAttributeText('manufacturer');
}
$color = $product->getData('color');
if ($color && !isset($colors[$color])) {
$colors[$color] = $product->getAttributeText('color');
}
}
after this, `$manufacutrers` and `$colors` should contain all the values you need. The key is the id, and the value is the option label.
But this may cause performance issues if you have a large product collection.
Magento : 404 error is showing admin page
Hello, Sometimes we may get the error on admin page once done with the Magento installation. In that scenario, we have to do the following: ...
-
Hi , In this blog I’m going to explain you how to create accordion tabs in magento for layered navigation as displayed below for attribut...
-
To create a 404 page Create a CMS Page with Correct 'Store View'. Then go to System=>Config=>General=>Web in Default ...
-
Open your phpmyadmin from your host try once this sql command. Run this Sql : SET FOREIGN_KEY_CHECKS=0; UPDATE core_store SET store_i...