在Magento后台删除产品时,默认不会删除产品的图片,如果长期不清理这些废弃的图片,会导致Media目录下的文件越来越多,浪费服务器空间,为了实现删除产品的同时删除图片,网络上常见的方法是修改Mage_Catalog_Model_Product的delete()方法: 把 public function delete() { parent::delete(); Mage::dispatchEvent($this->_eventPrefix.'_delete_after_done', array
封装函数: Sub 插入产品形象(strRange As String, datebaseTu As String) Dim strJpg As String strJpg = datebaseTu '... .jpg If Dir(strJpg, vbDirectory) <> "" Then ActiveSheet.Pictures.Insert(strJpg).Select Dim cT As Single Dim cL As Single Dim cW As Sin
Public Sub StartRecursionFolder() Dim Pre As Presentation Dim FolderPath As String Dim pp As String Dim id As String Dim oFileDialog As FileDialog Set oFileDialog = Application.FileDialog(msoFileDialogFolderPicker) Set Pre = Application.ActivePresent