Jump to content
xt:Commerce Community Forum

Template anpassen


tonkelz

Recommended Posts

Hallo!

ich habe folgendes Problem und bekomms einfach nicht hin:

ich wollte die Contrib "warenkorb_bilder" einbauen

hier die geänderte box_cart.html

{config_load file="$language/lang_$language.conf" section="boxes"}

{if $deny_cart neq 'true'}

{if $empty=='false'}

    <div class="box">

        <div class="infoBoxHeading_right">

            <a href="{$LINK_CART}">

                <img src="{$tpl_path}img/arrow.png" alt="Warenkorb" />

             {#heading_cart#}</a>

        </div><br>

        {foreach name=aussen item=products_data from=$products}

            <div style="width:98%; position: absolute;"> 

             {$products_data.QTY} x 

            <a href="{$products_data.LINK}">{$products_data.NAME|truncate:14:"...":true}</a> 

            </div> 

            <div style="width:98%;" align="right"> 

            <a href="{$products_data.LINK}"><img src="{$products_data.PRODUCTS_IMAGE}" style="Border: 0px; width: 45px;" alt="{$products_data.PRODUCTS_NAME}" /> </a> 

            </div>

      <hr size="1" style="color:#5B85B6" width="96%" />


        {/foreach}

        {if $DISCOUNT}

            <div align="right" class="productDiscountPrice">

                {#text_discount#} {$DISCOUNT}

            </div>

        {/if}

        <div align="right">{$UST}<strong>{#text_total#}</strong>{$TOTAL}{if $SHIPPING_INFO} <br />{$SHIPPING_INFO} {/if}</div>

    </div>

{else}

    <div class="box">

        <div class="infoBoxHeading_right">

            <a href="{$LINK_CART}">

                <img src="{$tpl_path}img/arrow_right.gif" alt="Warenkorb" /> {#heading_cart#} 

            </a>

        </div>

        <div class="boxText">{#text_empty_cart#}</div>

    </div>

    {/if}

{/if}
hier die vom template:
{config_load file="$language/lang_$language.conf" section="boxes"}

{if $deny_cart neq 'true'}

{if $empty=='false'}

<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td valign="top" class="infoBoxHeading"><div style="padding-top:5px;">

        <table width="100%" border="0" cellpadding="0" cellspacing="0">

        <tr>

          <td class="cart" valign="top">{#heading_cart#}</td>

          <td style="padding-right:20px;" align="right"><div style="padding-top:3px"><a href="{$LINK_CART}"><img src="{$tpl_path}img/icon_more_light.gif" alt="" /></a></div></td>

        </tr>

    </table></div>

        </td>

  </tr>

  <tr>

    <td class="infoBox_right" align="left">

        <table width="100%"  border="0" cellpadding="2" cellspacing="0">

        <tr>

          <td style="padding-left:10px" class="boxText">

                  <table align="center" border="0" width="90%" cellspacing="0" cellpadding="3" class="infoBoxContents">

            <tr>

              <td style="border-bottom: 1px solid; border-color: #cccccc;" align="left" class="boxText2">

                <table width="100%" border="0" cellspacing="0" cellpadding="0">

                                {foreach name=aussen item=products_data from=$products}

                                  <tr>

                                        <td class="boxText2">{$products_data.QTY} x </td>

                                        <td class="main"><a href="{$products_data.LINK}">{$products_data.NAME|truncate:15:"...":true}</a></td>

                                  </tr>

                                {/foreach}

                                </table>

                          </td>

            </tr>

            {if $DISCOUNT}

                        <tr>

              <td align="right" class="productDiscountPrice">{#text_discount#} {$DISCOUNT}</td>

            </tr>{/if}

            <tr>

              <td class="boxText2">{$UST}<b>{#text_total#}</b>{$TOTAL}{if $SHIPPING_INFO}<br />{$SHIPPING_INFO}{/if}</td>

            </tr>

          </table>

                 </td>

        </tr>

    </table>

    </td>

  </tr>

</table>

{else} <!-- cart has no content -->

<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td valign="top" class="infoBoxHeading"><div style="padding-top:5px;">

        <table width="100%" border="0" cellpadding="0" cellspacing="0">

        <tr>

          <td class="cart" valign="top">{#heading_cart#}</td>

          <td style="padding-right:20px;" align="right"><div style="padding-top:3px"><a href="{$LINK_CART}"><img src="{$tpl_path}img/icon_more_light.gif" alt="" /></a></div></td>

        </tr>

    </table></div>

        </td>

  </tr>

  <tr>

    <td style="padding-left:15px" class="infoBox_right" align="left">

        <table width="90%"  border="0" cellpadding="2" cellspacing="0">

        <tr>

          <td class="boxText2">{#text_empty_cart#}</td>

        </tr>

    </table>

        </td>

  </tr>

</table>

{/if}


{if $coupon_valid == 'true'}

<table class="infoBoxContents" width="100%" border="0" cellpadding="0" cellspacing="0">

<tr>


<td align="center" class="infoBox_right">

<table width="75%" border="0" cellpadding="0" cellspacing="0">

<tr>

<td><img src="{$tpl_path}img/pixel_trans.gif" alt="" width="100%" height="1" /></td>

</tr>

<tr>

<td align="center" class="smalltext">{#cart_coupon#}</td>

</tr>

<tr>

<td align="center" class="gvBox" valign="bottom">{$coupon_amount}</td>

</tr>

</table>

</td>

</tr>

</table>


<table cellpadding="0" width="100%" cellspacing="0" border="0">

<tr>

<td class="infoBox_right"><img src="{$tpl_path}img/pixel_trans.gif" alt="" width="100%" height="1" /></td>

</tr>

</table>

{/if}

{/if}
So! ich möchte aber es haben wie in der templatedatei. Leider kann ich diese dateien nicht zusammenwürfeln. Habe es schon so versucht:
<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td valign="top" class="infoBoxHeading"><div style="padding-top:5px;">

        <table width="100%" border="0" cellpadding="0" cellspacing="0">

        <tr>

          <td class="cart" valign="top">{#heading_cart#}</td>

          <td style="padding-right:20px;" align="right"><div style="padding-top:3px"><a href="{$LINK_CART}"><img src="{$tpl_path}img/icon_more_light.gif" alt="" /></a></div></td>

        </tr>

    </table></div>

        </td>

  </tr>

  <tr>

{foreach name=aussen item=products_data from=$products}

            <div style="width:98%; position: absolute;"> 

             {$products_data.QTY} x 

            <a href="{$products_data.LINK}">{$products_data.NAME|truncate:14:"...":true}</a> 

            </div> 

            <div style="width:98%;" align="right"> 

            <a href="{$products_data.LINK}"><img src="{$products_data.PRODUCTS_IMAGE}" style="Border: 0px; width: 45px;" alt="{$products_data.PRODUCTS_NAME}" /> </a> 

            </div>

      <hr size="1" style="color:#5B85B6" width="96%" />


        {/foreach}

        {if $DISCOUNT}

            <div align="right" class="productDiscountPrice">

                {#text_discount#} {$DISCOUNT}

            </div>

        {/if}

        <div align="right">{$UST}<strong>{#text_total#}</strong>{$TOTAL}{if $SHIPPING_INFO} <br />{$SHIPPING_INFO} {/if}</div>

    </div>

{else}

    <div class="box">

        <div class="boxText">{#text_empty_cart#}</div>

    </div>

    {/if}

{/if}



Funkioniert aber nicht da es das template zerschießt.

Wie bekomme ich den Header der Box hin wie bei allen anderen?

Jetzt erscheint ja nur ein Pfeil und Warenkorb

Gibt mir mal einen Denkanstoß---Danke

Link to comment
Share on other sites

Was mir aufgefallen ist:

Wenn ich dies so mache ist der Header dann unterhalb wenn etwas im Warenkorb liegt.

Wenn nichts drin ist,ist er oberhalb.

{config_load file="$language/lang_$language.conf" section="boxes"}

{if $deny_cart neq 'true'}

{if $empty=='false'}

<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td valign="top" class="infoBoxHeading"><div style="padding-top:5px;">

        <table width="100%" border="0" cellpadding="0" cellspacing="0">

        <tr>

          <td class="cart" valign="top">{#heading_cart#}</td>

          <td style="padding-right:20px;" align="right"><div style="padding-top:3px"><a href="{$LINK_CART}"><img src="{$tpl_path}img/icon_more_light.gif" alt="" /></a></div></td>

        </tr>

    </table></div>

        </td>

  </tr>


<br>

        {foreach name=aussen item=products_data from=$products}

            <div style="width:98%; position: absolute;"> 

             {$products_data.QTY} x 

            <a href="{$products_data.LINK}">{$products_data.NAME|truncate:14:"...":true}</a> 

            </div> 

            <div style="width:98%;" align="right"> 

            <a href="{$products_data.LINK}"><img src="{$products_data.PRODUCTS_IMAGE}" style="Border: 0px; width: 45px;" alt="{$products_data.PRODUCTS_NAME}" /> </a> 

            </div>

      <hr size="1" style="color:#5B85B6" width="96%" />


        {/foreach}

        {if $DISCOUNT}

            <div align="right" class="productDiscountPrice">

                {#text_discount#} {$DISCOUNT}

            </div>

        {/if}

        <div align="right">{$UST}<strong>{#text_total#}</strong>{$TOTAL}{if $SHIPPING_INFO} <br />{$SHIPPING_INFO} {/if}</div>

    </div>

{else}

    <table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td valign="top" class="infoBoxHeading"><div style="padding-top:5px;">

        <table width="100%" border="0" cellpadding="0" cellspacing="0">

        <tr>

          <td class="cart" valign="top">{#heading_cart#}</td>

          <td style="padding-right:20px;" align="right"><div style="padding-top:3px"><a href="{$LINK_CART}"><img src="{$tpl_path}img/icon_more_light.gif" alt="" /></a></div></td>

        </tr>

    </table></div><p><p><p>

    <div class="boxText">{#text_empty_cart#}</div>

    </div>

        </td>

  </tr>


    {/if}

{/if}

Außerdem wir mein template nach rechts verzogen.

Link to comment
Share on other sites

  • 4 weeks later...

das ist eigentlich simples HTML, was Du da hast ist allerdings gelinde gesagt Mist.

Tabellen mit Container verschachtelt. Class Anweissungen daneben gleich inline CSS Anweisungen usw.

Strukturier Dir das Gerüst für Deinen Warenkorb vernünftig und bau dann die Smarty Variabeln ein.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...