HI there,
Though out last year I had developed an 'easy embed template' for Zen Cart 1.2.x.
All you had to do was define a template file for your site in the config, and through a long set of REGULAR EXPRESSIONS it would put what ever you had for the rest of your site around your zen cart. embedding it in in site of the master template.
Well for ver 1.3.x I am going to realease that code. this is the starter thread.
below I am going to paste all the expressions, please feel free to make any suggestions as, I stumbled through making them and could use the communities help.

JOsh

PHP Code:
//strip some duplicate tags that zen cart manages itself 
$sitetemplate=preg_replace('/<!DOCTYPE.*?>/si'''$sitetemplate);
$sitetemplate=preg_replace('/<meta.*?>/si'''$sitetemplate);
$sitetemplate=preg_replace('/<html.*?>/si'''$sitetemplate);
$sitetemplate=preg_replace('/<title.*?title>/si'''$sitetemplate);


//Sangus: replace hrefs to point above catalog, but not the href for the style sheet! or http links!
$sitetemplate=preg_replace('/href="/si''href="../'$sitetemplate);
$sitetemplate=preg_replace('/href="..\/..\//si''href="../'$sitetemplate);
$sitetemplate=preg_replace('/href="..\/http/si''href="http'$sitetemplate);

//replace last bits: img src
$sitetemplate=preg_replace('/src="images/si''src="../images'$sitetemplate);
$sitetemplate=preg_replace('/<!-- START EMBED -->/si''<!-- START EMBED -->'$sitetemplate);
$sitetemplate=preg_replace('/<!-- END EMBED -->/si''<!-- END EMBED -->'$sitetemplate);

//creates bits for the had and the body
$sitetemplate_head preg_replace('/<\/head>.*$/s'''$sitetemplate);
$sitetemplate_top=preg_replace('/<!-- START EMBED -->.*$/s'''$sitetemplate);

//replicats info fot the body tag atributes
preg_match('/<body([^>]+)>/'$sitetemplate$sitetemplate_body_pre) ;
$sitetemplate_body =  $sitetemplate_body_pre['1'];
$sitetemplate_body preg_replace('/images/s''../images'$sitetemplate_body);

//strips the head info from the body
$sitetemplate_top=preg_replace('@<head[^>]*?>.*?<body.*?>@si'''$sitetemplate_top);
$sitetemplate_top=preg_replace("@,'images/@si"",'/images/",  $sitetemplate_top);

//strips the head info from the body
$sitetemplate_head=preg_replace('@</head>@si'''$sitetemplate_head);
$sitetemplate_head=preg_replace('@<head>@si'''$sitetemplate_head);