Loading Product $_productId = 52; $_product = Mage::getModel(‘catalog/product’)->load($_productId); – Get Regular Price chưa có phần formart theo currency. $_actualPrice = $_product->getPrice(); – Get Regular Price đã formart theo currency. $_formattedActualPrice = Mage::helper(‘core’)->currency($_product->getPrice(),true,false); Get Special Price // special price chưa có formart theo currency. $_specialPrice = $_product->getSpecialPrice(); // specila price đã formart theo currency $_formattedSpecialPrice =..
Read moreGo To Line 59 of the file app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php Replace public function supportEngine() { $variables = $this->_getConnection() ->fetchPairs(‘SHOW VARIABLES’); return (!isset($variables[‘have_innodb’]) || $variables[‘have_innodb’] != ‘YES’) ? false : true; } With public function supportEngine() { $variables = $this->_getConnection() ->fetchPairs(‘SHOW ENGINES’); return (isset($variables[‘InnoDB’]) && $variables[‘InnoDB’] != ‘NO’); }
Read moreOptimize magento database Log Cleaning Magento maintains several tables for logging. These tables log things such as customer accesses and which products have been compared. Magento has a mechanism for cleaning these logs regularly, but unfortunately this feature is disabled by default and most customers do not turn it on. There are three ways to..
Read moreThere has been an error processing your request. SQLSTATE[HY000]: General error: 1030 Got error 28 from storage engine >>>> Fix: Clear tmp folder
Read moreIf you are still having issues with this try creating a new dir called tmp. Navigate to app/code/core/Zend/Cache/Backend/ Edit File.php Change: protected $_options = array( ‘cache_dir’ => ‘null’, to protected $_options = array( ‘cache_dir’ => ‘tmp/’, For Magento Version 1.4.1.0
Read moreTìm các dòng trong .htacess và thay thế như bên dưới ############################################ ## enable apache served files compression ## http://developer.yahoo.com/performance/rules.html#gzip # Insert filter SetOutputFilter DEFLATE # Netscape 4.x has some problems… BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine BrowserMatch..
Read moreTo resolve it open app/code/core/Mage/ImportExport/Model/Export/Adapter/Abstract.php around line no. 60 replace $destination = tempnam(sys_get_temp_dir(), ‘importexport_’); to $destination = tempnam(Mage::getBaseDir() . ‘/tmp/’ , ‘importexport_’);
Read moreAdd layout.css or style.css in your theme p img { max-width: 500px; height: auto; }
Read moreGiá thành sản phẩm dù được cập nhật thông qua hồ sơ cá nhân nhập khẩu mặc định mặc nhưng điều này là rất chậm và đòi hỏi rất nhiều fields csv (ngoài sku và prices) để có thể cập nhật. Hôm nay tôi sẽ nói chuyện về việc cập nhật giá sản phẩm chỉ..
Read moreBạn muốn xóa một thuộc tính. Nhưng không có tùy chọn xóa trong khi bạn chỉnh sửa các thuộc tính. Điều này có nghĩa rằng thuộc tính là thuộc tính hệ thống. Thuộc tính hệ thống không thể bị xóa. Thuộc tính chỉ người dùng định nghĩa có thể bị xóa.
Read moreVào app\design\frontend\default\your theme\template\page\html\footer.phtml chèn vào đoạn $visitor_count = Mage::getModel(‘log/visitor_online’)->prepare()->getCollection()->count(); $write = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’); $readresult=$write->query(“select count(distinct customer_id) as num_visitors from log_visitor_online where last_visit_at > date_sub(now(),INTERVAL 20 MINUTE); “); $row = $readresult->fetch();$n=0;if($row[‘num_visitors’]>0) $n = $row[‘num_visitors’]; echo “Customers online: “.$n; $guest = $visitor_count-$n; echo ” | Guest online: “.$guest.” | “; if(!empty($visitor_count) && $visitor_count > 0){ $cnt = $visitor_count;..
Read moreThiết lập giá trị $_columnCount = Ở trên đoạn if($_columnCount == 5){ $imgSize = 180; }elseif($_columnCount == 3){ $imgSize = 245; }
Read moreTìm < ?php $i=0; foreach ($_productCollection as $_product): ?> Thêm vào sau < ?php if($this->getIsHomepage() && $i==10) break; ?>
Read moreTutorial này sẽ hướng dẫn các bạn cho hiển thị danh sách sub-category bao gồm ảnh thumbnails và tên của subcategories trong trang category. Bước 1: Đăng nhập vào admin: CMS -> Static Blocks -> Add New Block Bước 2: Gọi block này vào nội dung static block -> save. {{block type=”catalog/navigation” template=”catalog/navigation/subcategory_listing.phtml”}}
Read moreDS các thành phố VN INSERT INTO `by_directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (485, ‘VN’, ‘HN’, ‘Hà Nội’), (487, ‘VN’, ‘HCMC’, ‘Tp Hồ Chí Minh’), (488, ‘VN’, ‘HP’, ‘Hải Phòng’), (489, ‘VN’, ‘BR’, ‘Bà Rịa’), (490, ‘VN’, ‘VT’, ‘Vũng Tàu’), (491, ‘VN’, ‘BL’, ‘Bạc Liêu’), (492, ‘VN’, ‘BG’, ‘Bắc Giang’), (493, ‘VN’, ‘BC’, ‘Bắc Cạn’),..
Read moreStep 1: Open file with path: app\code\core\Mage\Directory\Model\Currency.php Step 2: Old line: return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets); New line: return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets); Step 3: System/Cache management/ Action: 1. [Select all] -> [Refresh] -> [Submit] 2. [Flush Cache Storage]
Read more
Leave a Reply