Announcement

Collapse
No announcement yet.

Auto re-size layout with add to cart

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Auto re-size layout with add to cart

    Hi Guy's,

    Been trying to modify the auto-resize layout for extended description to have the add to cart button. I have modified the autosize script to leave more room on the right side where I want my product info to go. But I cannot seem to get the tables on the right of the image.


    Code:
    <html>
    <head>
    <Actinic:WINDOW width="<Actinic:Variable Name="ExtendedInfoImageWidth"/>" height="<Actinic:Variable Name="ExtendedInfoImageHeight"/>"/>
       <title><actinic:variable name="PageTitle" /></title>
       <actinic:variable name="BaseHref" />
        <script language='javascript'>
    	  var arrTemp=self.location.href.split("?");
    	  var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
    	  var NS = (navigator.appName=="Netscape")?true:false; 
    	  
    	  function FitPic()	   {
    	   iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
    	   iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
    	   iWidth = document.images[0].width - iWidth + 200; 
    	   iHeight = document.images[0].height - iHeight - 10; 
    	   window.resizeBy(iWidth, iHeight); self.focus(); }; 
    	</script>
    </head>
    
    <body bgcolor="#ffffff" onload='FitPic();' topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
      <script language='javascript'>
        document.write( "<a href=\"javascript:window.close();\"><img src=\"<Actinic:Variable Name="ExtendedInfoImage"/>\" width=\"<Actinic:Variable Name="ExtendedInfoImageWidth"/>\" height=\"<Actinic:Variable Name="ExtendedInfoImageHeight"/>\" border=\"0\"></a>" );
      </script>
    
    <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />"> 
             <input type="hidden" name="SID" value="<Actinic:Variable Name="SectionID"/>" />
             <input type="hidden" name="PAGE" value="PRODUCT" />           
             <input type="hidden" name="PAGEFILENAME" value="<actinic:variable name="SectionPageName" />" />
             <Actinic:SECTION BLOB='<Actinic:Variable Name="SectionCatFile"/>'/>
             <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
                <!-- Hidden field when in trial mode -->
                <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />
             </actinic:block>
    
    <table width="100%" cellspacing="0" cellpadding="10" border="0">
       <tr>
          <td width="25%" align="center" valign="top">
                <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductReferenceVisible%22%20%2f%3e" >
                Ref: <actinic:variable Name="ProductReference" />
                </actinic:block>
         
          <td width="75%" align="center">
             <actinic:variable name="ExtendedInfoText" />
                <br />         
             <actinic:block if="%3cactinic%3avariable%20name%3d%22FileURLNotEmpty%22%20%2f%3e">
                <a href="<Actinic:Variable Name="ProductLinkInfo"/>">
                   <Actinic:Variable Name="ProductLinkText"/>
                </a>
             </actinic:block>
             <actinic:block if="%3cactinic%3avariable%20name%3d%22IsCustomerMessageUsed%22%20%2f%3e">
                <br />
                <Actinic:PRICE_EXPLANATION PROD_REF="<actinic:variable Name="ProductID" />" COMPONENTID=-1><Actinic:Variable Name="RetailCustomerMessage"/></Actinic:PRICE_EXPLANATION>
             </actinic:block>
             <actinic:block if="%3cactinic%3avariable%20name%3d%22PriceIsEnabled%22%20%2f%3e">
    				<b>
    				<Actinic:PRICES PROD_REF="<actinic:variable Name="ProductID" />" RETAIL_PRICE_PROMPT="<Actinic:Variable Name="ProductPriceDescription"/>">
                <actinic:variable name="PriceListRetail" />
                </Actinic:PRICES>
                </b>
             </actinic:block>
             <actinic:block if="%3cactinic%3avariable%20name%3d%22DiscountDescriptionIsShownForProducts%22%20%2f%3e">      
                <br /><actinic:variable name="DiscountList" value="Standard Discount List" />
             </actinic:block>
             <actinic:block if="%3cactinic%3avariable%20name%3d%22IsOtherInfoPromptShown%22%20%2f%3e">
                <br />
                <span class="actrequired"><Actinic:Variable Name="OtherInfoPrompt"/></span><br />
                <input type="text" name="O_<actinic:variable Name="ProductID"/>" size="40" maxlength="1000" value="" />
             </actinic:block>
             <actinic:block if="%3cactinic%3avariable%20name%3d%22IsDatePromptShown%22%20%2f%3e">
                <br />
                <span class="actrequired"><actinic:variable name="DatePrompt"/></span><br />
                <actinic:variable name="DayList" /><actinic:variable name="MonthList" /><actinic:variable name="YearList" />
             </actinic:block>
             
             <actinic:variable name="AttributeList" />
             <actinic:variable name="ComponentList" />
             
             <actinic:block if="%3cactinic%3avariable%20name%3d%22IsQuantityPromptShown%22%20%2f%3e">
                <br />
                <span class="actrequired"><Actinic:Variable Name="QuantityPrompt"/></span>
                &nbsp;
                <input type="text" name="Q_<actinic:variable Name="ProductID"/>" size="4" value="<Actinic:Variable Name="DefaultQuantity"/>" />
             </actinic:block>
             <actinic:block if="%3cactinic%3avariable%20name%3d%22IsQuantityPromptHidden%22%20%2f%3e">
                <input type="hidden" name="Q_<actinic:variable Name="ProductID"/>"  value="<actinic:variable name="DefaultQuantity"/>" />
             </actinic:block>
    
             <br /><actinic:variable name="CartError" />
    
             <actinic:block if="%3cactinic%3avariable%20name%3d%22IsAddToCartButtonShown%22%20%2f%3e">
                <br /><actinic:variable name="AddToCartButton" />
             </actinic:block>
    
             <actinic:block if="%3cactinic%3avariable%20name%3d%22IsOutOfStockShown%22%20%2f%3e">
                <br /><br /><strong><span class="actrequired"><br /><Actinic:Variable Name="OutOfStock"/></span></strong>
             </actinic:block>  
          </td></td>
       </tr>
    </table>
          </form>
    </body>
    </html>
    See attached pic.

    Thanks!!
    Attached Files
    Thanks!!

    Regards,

    Bob

    www.valleydecoratingdepot.com

    #2
    Badly formed table. One of the

    </td></td>

    should be above

    <td width="75%" align="center">

    It may also help to temporarily add border=1 to the <table ...> tag so you can see where the cells are.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman,

      It wouldnt have anything to do with the javascript resize that is interfering with the cell positioning would it?

      Thanks,

      Regards,
      Thanks!!

      Regards,

      Bob

      www.valleydecoratingdepot.com

      Comment


        #4
        I've no idea. Also try putting the product image within the TABLE.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X