Page 1 of 1

Replacing Multi Product Images V4 with Magic Zoom Plus V2.

Posted: Wed Jun 18, 2014 2:20 pm
by norman
This is for a site using Multi Product Images V4 and who wants to transition to Magic Zoom Plus V2.

This will allow Extra Image 0 through Extra Image 6 to work in Magic Zoom Plus instead of Multi Product Images.
Images set for Zoom Image 0 through Zoom Image 6 will override any Extra Image (n) ones.
This will allow you to gradually replace the Multi Product Images as required.

Install Magic Zoom Plus as per its ReadMe.

Go to Design / Library / Layouts / Zoom Image / Layout / Magic Zoom First Product Image.
Look for the line:

Code: Select all

$zoomimagecount = count($zoomimages);
Below that line add:

Code: Select all

$extraimages = array('<actinic:variable name="ExtraImage0" encoding="perl" selectable="false" />',
							'<actinic:variable name="ExtraImage1" encoding="perl" selectable="false" />',
							'<actinic:variable name="ExtraImage2" encoding="perl" selectable="false" />',
							'<actinic:variable name="ExtraImage3" encoding="perl" selectable="false" />',
							'<actinic:variable name="ExtraImage4" encoding="perl" selectable="false" />',
							'<actinic:variable name="ExtraImage5" encoding="perl" selectable="false" />',
							'<actinic:variable name="ExtraImage6" encoding="perl" selectable="false" />');
for ( $i = 0; $i < $zoomimagecount; $i++ )
	{
	if ( $zoomimages[$i] == '' ) $zoomimages[$i] = $extraimages[$i];
	}
Repeat the above for Design / Library / Layouts / Zoom Image / Layout / Magic Zoom Image List.


Go to Design / Library / Layouts / Product Image / Standard Product Image.
Double-click the first lines BlockIf (marked <!-- Magic zoom prefix V2.14 -->).
You should see a Condition:

Code: Select all

(<actinic:variable name="ZoomImage0" /> != "")
OR (<actinic:variable name="ZoomImage1" /> != "")
OR (<actinic:variable name="ZoomImage2" /> != "")
OR (<actinic:variable name="ZoomImage3" /> != "")
OR (<actinic:variable name="ZoomImage4" /> != "")
OR (<actinic:variable name="ZoomImage5" /> != "")
OR (<actinic:variable name="ZoomImage6" /> != "")
Replace with:

Code: Select all

(<actinic:variable name="ZoomImage0" /> != "") OR (<actinic:variable name="ExtraImage0" /> != "")
OR (<actinic:variable name="ZoomImage1" /> != "") OR (<actinic:variable name="ExtraImage1" /> != "")
OR (<actinic:variable name="ZoomImage2" /> != "") OR (<actinic:variable name="ExtraImage2" /> != "")
OR (<actinic:variable name="ZoomImage3" /> != "") OR (<actinic:variable name="ExtraImage3" /> != "")
OR (<actinic:variable name="ZoomImage4" /> != "") OR (<actinic:variable name="ExtraImage4" /> != "")
OR (<actinic:variable name="ZoomImage5" /> != "") OR (<actinic:variable name="ExtraImage5" /> != "")
OR (<actinic:variable name="ZoomImage6" /> != "") OR (<actinic:variable name="ExtraImage6" /> != "")
Look near the bottom for the last BlockIf (marked <!-- Magic zoom suffix V2.14 -->).
Double-click it and you should see a Condition:

Code: Select all

(<actinic:variable name="ZoomImage0" /> != "")
OR (<actinic:variable name="ZoomImage1" /> != "")
OR (<actinic:variable name="ZoomImage2" /> != "")
OR (<actinic:variable name="ZoomImage3" /> != "")
OR (<actinic:variable name="ZoomImage4" /> != "")
OR (<actinic:variable name="ZoomImage5" /> != "")
OR (<actinic:variable name="ZoomImage6" /> != "")
Replace with:

Code: Select all

(<actinic:variable name="ZoomImage0" /> != "") OR (<actinic:variable name="ExtraImage0" /> != "")
OR (<actinic:variable name="ZoomImage1" /> != "") OR (<actinic:variable name="ExtraImage1" /> != "")
OR (<actinic:variable name="ZoomImage2" /> != "") OR (<actinic:variable name="ExtraImage2" /> != "")
OR (<actinic:variable name="ZoomImage3" /> != "") OR (<actinic:variable name="ExtraImage3" /> != "")
OR (<actinic:variable name="ZoomImage4" /> != "") OR (<actinic:variable name="ExtraImage4" /> != "")
OR (<actinic:variable name="ZoomImage5" /> != "") OR (<actinic:variable name="ExtraImage5" /> != "")
OR (<actinic:variable name="ZoomImage6" /> != "") OR (<actinic:variable name="ExtraImage6" /> != "")