Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / ICECAT catalogue integration - working but need help with resizing iframes

ICECAT catalogue integration - working but need help with resizing iframes

Locked

Views: 4,720

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
21 Jan 2009, 9:37 AM
#1
pcspot avatar

pcspot

New Zenner

Join Date:
Aug 2007
Posts:
31
Plugin Contributions:
0

ICECAT catalogue integration - working but need help with resizing iframes

Hello All,

I have managed to incorporate ICECAT integration into my zen cart!!! I am surprised as well!!
see:
http://pcspot.co.za/hp-gb995ea-6930p-with-builtin-20mp-webcam-fingerprint-biom-p-13862.html

as an example.

however I am not able to get the width and height to 100% - if I change either it does not work. can someone help.

Heres the steps:
Useed dynamic drvie iframe code
http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

1)Placed the header info in
/public_html/includes/templates/XXXXX/common/html_header.php

<script type="text/javascript"> ``` /*********************************************** * IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com) * Visit DynamicDrive.com for hundreds of original DHTML scripts * This notice must stay intact for legal use ***********************************************/ //Input the IDs of the IFRAMES you wish to dynamically resize to match its content height: //Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none: var iframeids=["myframe"] //Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended): var iframehide="yes" var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1] var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers function resizeCaller() { var dyniframe=new Array() for (i=0; i<iframeids.length; i++){ if (document.getElementById) resizeIframe(iframeids[i]) //reveal iframe for lower end browsers? (see var above): if ((document.all || document.getElementById) && iframehide=="no"){ var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i]) tempobj.style.display="block" } } } function resizeIframe(frameid){ var currentfr=document.getElementById(frameid) if (currentfr && !window.opera){ currentfr.style.display="block" if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax currentfr.height = currentfr.Document.body.scrollHeight; if (currentfr.addEventListener) currentfr.addEventListener("load", readjustIframe, false) else if (currentfr.attachEvent){ currentfr.detachEvent("onload", readjustIframe) // Bug fix line currentfr.attachEvent("onload", readjustIframe) } } } function readjustIframe(loadevt) { var crossevt=(window.event)? event : loadevt var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement if (iframeroot) resizeIframe(iframeroot.id); } function loadintoIframe(iframeid, url){ if (document.getElementById) document.getElementById(iframeid).src=url } if (window.addEventListener) window.addEventListener("load", resizeCaller, false) else if (window.attachEvent) window.attachEvent("onload", resizeCaller) else window.onload=resizeCaller </script>

2) used the below code in the product description field

 <iframe id="myframe" src="XXXXXX" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>
where XXX is the icecat product page

And it pulls up correct info but resizing is problematic. And I think it crashes IE7!!!

can anyone suggest rememdies please.
ICECAT is greater for product descriptions expecially if there are 1000's of products in store!

thanks in advance
N
21 Jan 2009, 11:03 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: ICECAT catalogue integration - working but need help with resizing iframes

What is the point of the iframe? Just to get the scrolling box, or is there more that it is good for? Is it needed to get the live icecat display?

If all you need is a scrolling box to display your content/description/whatever, this will get it without anything that can crash a browser:

For an example, add to your stylesheet:
#productDescription {height: 200px; overflow: scroll;}

Change #productDescription to whatever is the id of the container for your icecat content.

21 Jan 2009, 11:53 AM
#3
pcspot avatar

pcspot

New Zenner

Join Date:
Aug 2007
Posts:
31
Plugin Contributions:
0

Re: ICECAT catalogue integration - working but need help with resizing iframes

Thanks glen,

will try your suggetsion. The iframe is good for getting remote product description hosted on another site and then displayed within teh zen cart product info page.

If this can be done by another method, I am willing to try but have not found another solution to get the ICECAT catalogue product descriptions to display on my product pages.

rgds

11 Mar 2009, 12:00 AM
#4
stevenlee avatar

stevenlee

New Zenner

Join Date:
Jun 2008
Posts:
85
Plugin Contributions:
0

Re: ICECAT catalogue integration - working but need help with resizing iframes

Hi pcspot,

I'm curious as to how you matched up the product description from the list that icecat gives you

I don't know much about matching the products in excel and wish I knew how it was done

I'm working on porting the icecat module from oscommerce, but it is slow going at the moment, I thought you were using the xml connection, but now I see that you are using iframes to pull the product data, I will be glad to share the files once I have them working 100%

I work for a computer sales company in the US so I won't be competing with you, please contact me when you have time and we will exchange ideas

thanks
Steve

7 Oct 2009, 3:43 PM
#5
goldlion avatar

goldlion

New Zenner

Join Date:
Dec 2008
Posts:
23
Plugin Contributions:
0

Re: ICECAT catalogue integration - working but need help with resizing iframes

Has anyone found a working solution to link ICECAT with ZEN Cart?

Greetings,
Paul

10 Nov 2009, 10:27 AM
#6
ettore avatar

ettore

New Zenner

Join Date:
Nov 2009
Location:
Italy
Posts:
14
Plugin Contributions:
0

Re: ICECAT catalogue integration - working but need help with resizing iframes

Hi, i've found a plugin named IceCART that automatically download and associate the informations given from Icecat, to the products of a Zencart shop.
It picks all the informations available on Icecat, and put them on your product in Zencart.
It's fully compatible with "Tabbed Products Pro" too.
There are a lot of other advanced functions to better manage the shop (Es: chose to "cache" the descriptiono from icecat into server, or to pick them on-line. The "caching" make the navigations faster)

Here more info: http://zen-lab.it/en/icecart

21 Nov 2009, 8:59 PM
#7
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: ICECAT catalogue integration - working but need help with resizing iframes

Hi
Can i ask how did you manage to incorporate ICECAT integration into zen cart?
Thanks for help?
Regards

21 Nov 2009, 9:03 PM
#8
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: ICECAT catalogue integration - working but need help with resizing iframes

Not sure if that what you are after , matching one range of data in excel with another range, if yes, then vlookup is the answer

stevenlee:

Hi pcspot,

I'm curious as to how you matched up the product description from the list that icecat gives you

I don't know much about matching the products in excel and wish I knew how it was done

I'm working on porting the icecat module from oscommerce, but it is slow going at the moment, I thought you were using the xml connection, but now I see that you are using iframes to pull the product data, I will be glad to share the files once I have them working 100%

I work for a computer sales company in the US so I won't be competing with you, please contact me when you have time and we will exchange ideas

thanks
Steve

21 Nov 2009, 10:49 PM
#9
ettore avatar

ettore

New Zenner

Join Date:
Nov 2009
Location:
Italy
Posts:
14
Plugin Contributions:
0

Re: ICECAT catalogue integration - working but need help with resizing iframes

I suggest you to look to the iceat.biz forum for an Icecat connector.