2

I have products that have an attribute for an external image location. When one of these products is added to the cart, I would like the cart thumbnail to to be replaced by this external image file.

Because I'm making this as part of an extension, for compatibly/portability reasons I really do not want to edit

/template/checkout/cart/item/default.phtml

I would rather just make it so when

$this->getProductThumbnail()->resize(75)

is called it knows to look for the external URL first, and display that if it's there.

I wanted to override

Mage_Checkout_Block_Cart_Item_Renderer:getProductThumbnail()

but then resize doesn't work properly.

Any ideas or help implementing this would be awesome. I know there must be some way to do it because there are extensions that allow all images to be moved to S3. Essentially it's the same idea. I think.

Thanks!

  • Have you updated external image attribute in function :public function getProductThumbnail() { if (!is_null($this->_productThumbnail)) { return $this->_productThumbnail; } return $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail'); }??? – Abdul Oct 31 '15 at 6:34
  • I'm not sure what you mean by "have I updated it". I would like to just return the external link there, but I can't because in the cart getProductThumbnail()->resize(75) is used. I can't call resize if just a string is being returned. – Removal Oct 31 '15 at 18:28
  • can you please add your codes in the question? – Abdul Nov 2 '15 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.