|
@JayKay8875: Sorry i had an issue with my text editor
Here is how it should go:
1. Go to Admin > Catalog > Attributes > Manage Attributes
2. Add New Attribute, set following attribute configuration, leave the default values unaltered for the fields not mentioned below, and Save:
Attribute Code: remote_image_url
Scope: Store View
Catalog Input Type for Store Owner: Text Field
Manage Labels / Options > Admin: Remote Image URL
3. Go to Admin > Catalog > Attributes > Manage Attribute Sets
4. Edit your attribute sets, drag’n’drop remote_image_url attribute to your sets (suggested - Images group), and Save.
5. Edit your products and set Remote Image URL = http://remote-host.com/remote/image.gif (replace with your image url)
6. Edit your custom theme files and replace internal images url with external as needed, examples:
CHANGE TEMPLATES FOR PRODUCT DETAILS VIEW:
FILE: app/design/frontend/[interface]/[theme]/template/catalog/product/view/media.phtml
FIND: (approx line 29)
<img id="image" src="<?php echo $this->helper('catalog/image')->init($_product, 'image'); ?>” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
REPLACE WITH:
<img id="image" src="<?php echo $_product->getData('remote_image_url'); ?>” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
FIND: (approx line 46)
<img id="image" src="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize(265); ?>” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
REPLACE WITH:
<img id="image" src="<?php echo $_product->getData('remote_image_url'); ?>” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
CHANGE LAYOUTS AND TEMPLATES FOR CATEGORY PRODUCT LIST:
FILE: app/design/frontend/[interface]/[theme]/layout/catalog.xml
FIND: (approx lines 73 and 103)
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
APPEND RIGHT AFTER:
<action method="addAttribute"><code>remote_image_url</code></action>
FILE: app/design/frontend/[interface]/[theme]/template/catalog/product/list.phtml
FIND: (approx line 45)
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
REPLACE WITH:
<img src="<?php echo $_product->getData('remote_image_url'); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
FIND: (approx line 93)
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
REPLACE WITH:
<img src="<?php echo $_product->getData('remote_image_url'); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
7. You can create few attributes in the same way for small, medium and large images.
Let me know if that worked out for you.
|