View Single Post
  #4  
Old 02-07-2020, 11:31 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: How to display product image as product thumbnail instead of default product variant.

The overwrite is done in

classes/XLite/Module/XC/ProductVariants/Model/Product.php
Code:
/** * Get image * * @return \XLite\Model\Image\Product\Image */ public function getImage() { return $this->isUseVariantImage() ? $this->getDefaultVariant()->getImage() : $this->getProductImage(); }


You can either change it to

Code:
/** * Get image * * @return \XLite\Model\Image\Product\Image */ public function getImage() { return $this->getProductImage(); }


or set



protected function isUseVariantImage()


to always return false


Note that this is probably used on products list pages and product details page so if you want one to show product image and the other variant image you will need to write some logic to distinguish between the two
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote