[ic] 3 questions regarding options, JavaScript and thumb images

Julia Jacobs interchange-users@interchange.redhat.com
Tue Feb 5 15:53:01 2002


Hi there!  Iım bumbling my way around Interchange and am enjoying the
challenge! Its like a huge mystery requiring lots of research and
exploration.  But Iım excited at all of the possibilities this software
offers.  I think once I get the hang of it I can offer my customers some
great products for a lot less money then my competitors.  I tried to tackle
learning Interchange about a year ago, but was too intimidated and
overwhelmed.  I think Iıve reached the skill level and Interchangeıs web
based interface (specially the template editor) has met me half way so now
we are a good match.

Iım using Interchange v.4.8.3 with Red Hat Linux 7.2 and Iıve created a
catalog with the foundation theme / type and Iım having problems with the
options (regarding the pricing of multiple values), adding JavaScript to a
new template in order to create rollover buttons and getting the thumb(nail)
images to show up in the catalog.

I have three questions:

1) I'm trying to figure out which options type to use for an Alaska Cruise
Product item in a travel agency e-commerce like web site.  This is how the
pricing is described in their brochure:

Grand Alaska I - 2212 € Seabourn Spirit € 10 Days

Suite Category                  Full Cruise         Early Booking Savings
Owner's Suite OW                $18,299             $9,150
Double Suite DS                   $13,599             $6,780
Classic Suite CS                   $12,599             $6,300
Suite Deck 6 B3                   $10,799             $5,400
Suite Deck 5 B2                   $9,499               $4,750
Suite Deck 6 A3                   $8,399               $4,200
Suite Deck 5 A2                   $7,749               $3,875
Suite Deck 4 A1                   $7,399               $3,700
Suite Deck 4 A                     $6,999               $3,500

I tried using the simple type, but could not get the pricing to work.  I
even tried changing the meta of the pricing, with restarting Interchange
(using the proper restart command), but the foundation catalog does not seem
to want to accept more than two extra pricings from options.  I looked over
the sample data as a reference for this information.  I also searched the
mailing list and Interchange reference info but could not find any more
wisdom.

2) I cannot get my JavaScript to work in the new template Iıve created. I've
tested the JavaScript, by replacing the a href=[area]s with actual Web Page
links and it works fine so I know the problem is not with the JavaScript
itself.
I created the template based on the no left top one ­ the one with the
template on the top and bottom and content in the middle.

This is the code I stick in the first text box:

<!-- BEGIN NOLEFT_TOP -->

[if scratch members_only]
    [set members_only][/set]
    [if !session logged_in]
    [set mv_successpage]@@MV_PAGE@@[/set]
    [bounce page=login]
    [/if]
[/if]

<html>
<head>

<title>eCruise and Tour Travel Agency</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript">


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

</script>

</head>

<body bgcolor="#FFFFFF" text="#000000" onLoad="MM_preloadImages
('tempimages/Cruse_overM.gif',
'tempimages/aboutUs_overM.gif',
'tempimages/create_overM.gif','
tempimages/travel_overM.gif',
'tempimages/contact_over.gif')">

<div align="center">

<!--- top banner image --->

  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td valign="top">
        <div align="left">
<img src="tempimages/Rsrtbanner.gif" width="602" height="89">
</div>
      </td>
    </tr>
    <tr> 
      <td valign="top" align="center">
      
<!--- menu - colored buttons THIS IS THE PART THAT DOES NOT WORK THAT
UTILIZES THE JAVASCRIPT IN THE HEAD SECTION--->

        <table width="100%" border="0" cellspacing="0" cellpadding="0"
align="center">
          <tr> 
            <td width="20%">
              <div align="center">
<a href="[area aboutus]" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image9','','tempimages/aboutUs_overM.gif',1)">
<img name="Image9" border="0" src="tempimages/AboutUs_M.gif" width="108"
height="44">
</a>
</div>
            </td>
            <td width="20%">
              <div align="center">
<a href="[area cruise]" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image10','','tempimages/Cruse_overM.gif',1)">
<img name="Image10" border="0" src="tempimages/Cruise_M.gif" width="109"
height="44">
</a>
</div>
            </td>
            <td width="17%">
              <div align="center">
<img src="tempimages/Resort_overM.gif" width="107" height="44">
</div>
            </td>
            <td width="3%">
              <div align="center"><a href="[area design]"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image11','','tempimages/create_overM.gif',1)"><im
g name="Image11" border="0" src="tempimages/Design_M.gif" width="107"
height="43">
</a>
</div>
            </td>
            <td width="20%">
              <div align="center"><a href="[area adv]"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image12','','tempimages/travel_overM.gif',1)"><im
g name="Image12" border="0" src="tempimages/Advisories_M.gif" width="108"
height="43">
</a>
</div>
            </td>
            <td width="20%">
              <div align="center"><a href="[area contact]"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image8','','tempimages/contact_over.gif',1)"><img
name="Image8" border="0" src="tempimages/mainscreen_r05_c02.gif" width="108"
height="44">
</a>
</div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr> 
      <td valign="top">

<!--- commerce menu --->
        
<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="100%" class="menubar" align="center">
 <a href="[area index]">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">home</font>
</a> 
              | [if session logged_in] <a href="[area logout]">
 <font face="Verdana, Arial, Helvetica, sans-serif" size="2">logout</font>
</a> 
              [else] <a href="[area login]">
 <font face="Verdana, Arial, Helvetica, sans-serif" size="2">login</font>
</a> 
              [/else] [/if]<font face="Verdana, Arial, Helvetica,
sans-serif" size="2">
              | <a href="[area ord/basket]">order / basket</a> | <a
href="[area ord/checkout]">order
              / checkout</a> | <a href="[area customerservice]">customer
service</a> 
              | <a href="[area aboutus]">about us</a></font> </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  </div>

<!--- left category column, main content column, and right special column
--->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
  <td width="95%" valign="top" align="center" class="maincontent">
    <!-- COMPONENT #1 -->

Then this is the code I stick in the bottom text box:

<center>

    <!--- created by currant media logo --->

<p align="center"><br>
  Website Created by:<br>
  <a href="http://www.currantmedia.com"><img
src="tempimages/Currantlogo.gif" width="100" height="36" border="0"></a>
</p>
    [if type=explicit compare="__MV_DEMO_MODE__"]
      <p>[page admin/index]Admin</a></p>
    [/if]
  </center>

  </td>
</tr>
</table>

<br>

</body>
</html>

The only error associated with the template that shows up in the error log
that I get is:
65.33.132.17 kefJrtwy:65.33.132.17 - [05/February/2002:13:37:22 -0600]
ecruise /cgi-bin/ecruise/admin/template_edit search error: your search file
a valid database reference, was 'backup'.

I donıt get it.  Any help would be appreciated.

3) How do you get the thumbnail images to show up in the foundation catalog?
Iıve set the categories in the Design section to the results.html, the
results_either.html and the results_big.html  checked all of the settings in
every table and I cannot get the thumb images to show up in the catalog.  I
know its not a permissions or path thing because I can click on the link of
the filename in the item editor.  Its got to be something basic and stupid,
but after searching through the reference guides and mailing list achieves I
canıt figure this out.  Help this poor fool out and give me a clue.

I was thinking it might be nice for newbies like myself to include some
samples of JavaScript in a template (rollovers, expanding menus, etc), also
some products with complicated options (matrix, modular and simple).  If
these already exist, can you point me to them?  Also if there are any cool
templates or catalog's other than foundation can someone point me to those
as well?  I know the CVS has skeleton's but I'm having a hard time
downloading them.  Does anyone have them in a non CVS format?

Sorry for the HUGE e-mail but I'm hoping a response to this issues can help
other folks out as well.
-- 
Julia Jacobs
Currant Media
407-977-4523
Fax 407-261-0176
http://www.currantmedia.com
Members of The Better Business Bureau
* Multimedia Producers
* Web Design & Development
* 2D/3D Graphics/Animation
* Hosting, domain and e-mail
* E-Commerce ­ check, credit card validation