Category: WP / Joomla! / Magento / Shopify / Drupal / Moodle / Zimbra


pingback和trackback的功能 说实话,这两个概念我也是断断续续地研究了好久才基本上理解了。 首先,pingback和trackback基本上是一样的东西,只是trackback出来的早,一些老式的博客系统使用,后来是pingback。pingback是自动的,而trackback需要你手动填写地址。 然后,说说这两个东西的功能。比如,我们在自己的网站上转载了一篇文章,文章内留下所转载文章的链接,发布之后,pingback和 trackback就会按照这个地址去通知被转载文章的网站,告知这里多了一个转载,pingback和trackback信息一般会以文章评论的形式展 现出来。pingbac… 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