Magento: 后台显示图片不能找到 Image file was not found on product tab

I was uploading some images from the magento backend, after so time, i got this error on my product tab. There has been an error processing your request Image file was not found. Trace: #0 /home/camerala/public_html/app/code/core/Mage/Catalog/Helper/Image.php(163): Mage_Catalog_Model_Product_Image->setBaseFile('/s/c/screen_pro...')… Read More

Magento 1.9:新订单通知 Admin Order Notifier

Here is a little Magento extension I wrote recently, its called Inchoo_AdminOrderNotifier. The whole idea behind the extension was to fulfil the request where you as a merchant wish to have your store personel instantly notified when customer places an order on your store. The way extension works is that it observes the sales_order_place_after event, an…

Magento 1.9.X 系列教程

Magento安装下载教学: Magento教程 1:免费购物车系统,轻松建立Magento第一步! Magento教程 2:Magento 社群版安装教学! Magento教程 3:如何在Magento社群版(Community Edition)安装范例资料? Magento工作流程: Magento教程 4:主机环境准备 Magento教程 5:系统安装与备份 Magento教程 6:商店设定与参数 Magento教程 7:客制化网站 Magento基本操作: Magento教程 8:如何新增首页选单? Magento教程 9:如何上传商品? Magento教程 10:如何修改网站文字? Magento教程 11:Inline Transla… Read More

Magento: 产品页面下jquery change函数失效 Call javascript function onchange product option on Magento product page

明显的原因是change函数跟magento默认的onchange函数冲突。 一个方法是编辑 /js/varien/configurable.js  文件 : Place call to your function just above return; in function reloadPrice: function() 另一个不修改核心文件的方法是: Try $(document).on('change','#multiid',function(){ alert('Change Happened'); }); As your select-box is generated from the code, so you have to use event deleg… Read More

Magento: 判断是否为手机浏览 Optimise Web’s Mobile Detect Class for Magento

项目地址:Optimise Web’s Mobile Detect Class for Magento Optimise Web’s Mobile Detect Class for Magento is a lightweight PHP class for detecting mobile devices. Optimise Web’s Magento extension allows using Mobile Detect’s functions from within Magento. Usage Mage::helper(‘mobiledetect’)-… Read More

Magento: addAttributeToFilter 和 addFieldToFilter 的区别 Difference between addAttributeToFilter and addFieldToFilter

addAttributeToFilter is used to filter EAV collections and will filter the products based on the attributes that you’ve included in your collection. EAV-models: product, customer, sales, etc. addFieldToFilter is used to filter Non-EAV collections and will filter the products based on columns in the database from the table catalog_product_en… Read More

Magento : 调用文件上传 upload file frontend

bool mkdir ( string $pathname [, int $mode = 0777 [, bool $recursive = false [, resource $context ]]] ) $pathname should be the server path to the file and not a url Try $path = Mage::getBaseDir('media') . DS; You should try using Varien_File_Uploader include_once Mage::getBaseDir() . '/lib/Varien/File/Uploader.php'; /* Starting upload */ $uploader = n… Read More

Magento: 自定义用户登录导向页面 Redirect Customer to Previous Page After Login

Configuration Settings – Login to admin panel – Go to System -> Configuration -> CUSTOMERS -> Customer Configuration -> Login Options – Set: Redirect Customers to Account Dashboard after Loggin in = No – You can see in comments for this field: Customer will stay on the current page if “No” is selected. This setting will redirect customers to the…

Magento: 代替flash上传 How to disable Flash uploader in Magento (product images and WYSIWYG)

1. 替换产品页flash上传按钮 – 使用 Dull_Uploader How to disable Flash uploader in Magento 1.4.x – 1.9.x So what to do if one day you will discover that you simply cannot upload any images in your Magento administration panel due to Flash problem? Don’t panic, just follow these simple steps: 1. Find the Dull_Uploader (No Flash Image Uploader) module…

Magento: 在客户账户中添加自定义链接 My Account Add Link

This extension add new link and a page to that link and enable/disable links in my account left Nav section. 页面: Magento Connect 2.0 : 下载:  ng_customer-1.0.2—-customer-account-page   本文: M… Read More

Magento: 根据产品属性加载产品信息 Load A Category or Product by an Attribute

Load a Product by ID <?php // get product model by product id, assuming you have known product id, $productId $_product = Mage::getModel('catalog/product')->load($productId) Load a Product by SKU <?php $sku = 'my-product-sku'; $product = Mage::getModel('catalog/product')->load($sku, 'sku'); if ($product->getId()) { echo $pr… Read More