Magento base image, small image, thumbnail image区别
			
			
				时间:2011-08-07 09:02来源:未知 作者:最模板 点击:次
            	Magento base image, small image, thumbnail image区别
			
			
				|  Magento添加产品的时候,图片分为三种,base images(产品大图片,产品页面展示的最美丽的那张图片),small image(小图,通常出现在产品列表中),thumbnail image(缩略图,更小的图片,通常出现在sidebox中)。普通情况下加产品,base image, small image, thumbnail image都是同一张图片。 网上找到的一段,根据base image 修复 small image, thumbnail image的代码: 
(责任编辑:最模板)
    
        
            | 01 | require'app/Mage.php'; |  
    
        
            | 04 | $products= Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*'); |  
    
        
            | 06 | foreach($productsas$product) { |  
    
        
            | 07 |     if(!$product->hasImage()) continue; |  
    
        
            | 08 |     if(!$product->hasSmallImage()) $product->setSmallImage($product->getImage()); |  
    
        
            | 09 |     if(!$product->hasThumbnail()) $product->setThumbnail($product->getImage()); |  | 
			
			 
			
			
			
			
			
			
			
			
				------分隔线----------------------------