Magic Zoom Default Image Border

Miscellaneous Actinic / SellerDeck patches and anything not covered above.
Post Reply
leej
Posts: 46
Joined: Thu May 17, 2007 10:03 am
Location: Otley, Leeds
Contact:

Magic Zoom Default Image Border

Post by leej »

Hi Norman,
I am building a site for a client at the moment which is using your Zoom Functionality. Their exisitng general images are 150px x 150px squared. I have tweaked the layout code slightly so that when the zoom image function kicks in then a 330px white frame appear around the image.

What I wanted to try and do is apply the same 330px white frame around the default image even id the zoom function is not enabled. I tried this by appyling a table around the default image code and it works to a degree until you apply the zoom image and a 'javascript error' statin 'Exception thrown and not caught'.

Code: Select all

<actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e" >

<actinic:block if="%3cactinic%3avariable%20name%3d%22ZoomImage0%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage1%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage2%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage3%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage4%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage5%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage6%22%20%2f%3e%20%3d%3d%20%22%22" ><table width="330" cellspacing="2" cellpadding="0" border="0" style="height:330px; border:0px solid #FF0000; background-color:#FFF;"><tr><td align="center" valign="middle" style="padding:3px; border:1px dashed #719a76;"></actinic:block>

   <img src="<actinic:variable name="ProductImageFileName" />"
		id="im_<actinic:variable name="EncodedProductAnchor" />"
      border="0"
      width="<actinic:variable name="ProductImageWidth" />"
      height="<actinic:variable name="ProductImageHeight" />"
      title="<actinic:variable name="ProductName" encoding="strip"/>"
      alt="<actinic:variable name="ProductName" encoding="strip"/>" />

<actinic:block if="%3cactinic%3avariable%20name%3d%22ZoomImage0%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage1%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage2%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage3%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage4%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage5%22%20%2f%3e%20%3d%3d%20%22%22%0dOR%20%3cactinic%3avariable%20name%3d%22ZoomImage6%22%20%2f%3e%20%3d%3d%20%22%22" ></td></tr></table></actinic:block>

</actinic:block>
What it seems as if its doing is overlaying my default table over the zoom function. Could you suggest a variable combination that could be applied around the Table code to not appear once the zoom function is enabled? Thanks for any suggestion regarding this. Lee.
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: Magic Zoom Default Image Border

Post by norman »

Your Condition is wrong. Assuming you want the table code to be generated when no Zoom images are defined you need to replace all OR with AND. E.g:

Code: Select all

<actinic:variable name="ZoomImage0" /> == ""
AND <actinic:variable name="ZoomImage1" /> == ""
AND <actinic:variable name="ZoomImage2" /> == ""
AND <actinic:variable name="ZoomImage3" /> == ""
AND <actinic:variable name="ZoomImage4" /> == ""
AND <actinic:variable name="ZoomImage5" /> == ""
AND <actinic:variable name="ZoomImage6" /> == ""
Do this in both places, of course.
Norman
leej
Posts: 46
Joined: Thu May 17, 2007 10:03 am
Location: Otley, Leeds
Contact:

Re: Magic Zoom Default Image Border

Post by leej »

Hi Norman,
Just wanted to say thanks for this solution. It worked a treat.

Regards.
Lee.
Post Reply