Để thay đổi ký hiệu ( symbol ) cho các đơn vị tiền tệ trong Magento. Bạn làm như sau
Bước 1:
- Đăng nhập phần quản trị Admin của Magento
Bước 2:
- Truy cập menu System => Manage Currency => Symbols
- Trong cửa sổ"Manage Currency Symbols" mới hiển thị, Thay đổi ký hiệu "đ" thành VNĐ. Refresh trang web để xem kết quả.
- Cty TNHH HAWAII-Mã số doanh nghiệp: 0312949876. Nhận thiết kế website bán hàng chuyên nghiệp dùng Magento
- Tư vấn SEO và SEO trọn gói website Magento
- Nhận quản trị website bán hàng trọn gói, ký hợp đồng năm
- Email: quocduy240@gmail.com. Mobile:(+84)127.867.2707. Skype: quocduy240
- Trụ sở chính: 230/14 Đường Man Thiện, Phường Tăng Nhơn Phú A, Quận 9, TP.Hồ Chí Minh, Việt Nam.
- Chi nhánh: 97A, Đường 19, Xã Bình Hưng, Huyện Bình Chánh, TP.Hồ Chí Minh, Việt Nam.
Showing posts with label Currency. Show all posts
Showing posts with label Currency. Show all posts
05 September 2014
Currency - Bỏ 2 chữ số thập phân của giá sản phẩm trong Magento
Ban đầu: 22.000,00đ
Kết quả: 22.000đ
Cách thực hiện như sau:
Bước 1:
Kết quả: 22.000đ
Cách thực hiện như sau:
Bước 1:
Vào thư mục code/core/Mage/Directory/Model/Currency.php
Copy file Currency.php và chuyển vào thư mục
code/local/Mage/Directory/Model/Currency.php
( Làm việc này để tránh tác động vào lõi code core của Magento, thuận tiện cho việc nâng cấp Magento sau này.)Copy file Currency.php và chuyển vào thư mục
code/local/Mage/Directory/Model/Currency.php
Bước 2:
Mở file Currency.php trong code/local/Mage/Directory/Model/Currency.php bằng chương trình chỉnh sửa file text, ví dụ như notepad. Tìm đến dòng code xung quanh dòng 194.
Sau đó clear Cache trong Magento, vào Admin truy cập menu System –> Cache Management => Refresh Cache ( Nhớ Select All )
- Nếu kết quả vẫn chưa như ý muốn, bạn vào thư mục var/cache xóa thư mục cache, sau đó refresh lại website.
Mở file Currency.php trong code/local/Mage/Directory/Model/Currency.php bằng chương trình chỉnh sửa file text, ví dụ như notepad. Tìm đến dòng code xung quanh dòng 194.
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
{ return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
}
Thay thế số 2 thành số 0. Lưu file.{ return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
}
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
{ return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
}
{ return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
}
- Nếu kết quả vẫn chưa như ý muốn, bạn vào thư mục var/cache xóa thư mục cache, sau đó refresh lại website.
Chúc bạn thành công !
