X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Bah these tables! Anyone care to point out my error? (https://forum.x-cart.com/showthread.php?t=41920)

ReadytoCover 08-22-2008 07:06 AM

Bah these tables! Anyone care to point out my error?
 
I am trying to move my 'Add to Cart' button to here:


http://www.readytocover.com/movebutton.gif


And this is the code I have...I can't figure out these dang tables I keep getting it mixed up. Is there a way to keep the right side compact and having the add to cart button next to it?

Here is what I have so far:

Code:

<table width="100%" cellpadding="0" cellspacing="0">
<tr><td colspan="3"><b><font class="ProductDetailsTitle">{$lng.lbl_details}</font></b></td></tr>
<tr><td class="Line" height="1" colspan="3"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td></tr>
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
    <td width="30%">{$lng.lbl_sku}</td>
    <td nowrap="nowrap" id="product_code">{$product.productcode}</td>
    <td nowrap="nowrap" id="product_code">&nbsp;</td>
</tr>
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""}
<tr>
    <td width="30%">{$lng.lbl_in_stock}</td>
    <td nowrap="nowrap" id="product_avail_txt">{if $product.avail gt 0}{$lng.txt_items_available|substitute:"items":$product.avail}{else}{$lng.lbl_no_items_available}{/if} </td>
    <td nowrap="nowrap" id="product_avail_txt">&nbsp;
</td>
</tr>
{/if}
{if $product.weight ne "0.00" || $variants ne ''}
<!-- <tr id="product_weight_box">
    <td width="30%">{$lng.lbl_weight}</td>
    <td nowrap="nowrap"><span id="product_weight">{$product.weight|formatprice}</span> {$config.General.weight_symbol}</td>
</tr> -->
{/if}
{if $active_modules.Extra_Fields ne ""}
{include file="modules/Extra_Fields/product.tpl"}
{/if}
{if $active_modules.Feature_Comparison ne ""}
{include file="modules/Feature_Comparison/product.tpl"}
{/if}
{if $active_modules.Subscriptions ne "" and $subscription}
{include file="modules/Subscriptions/subscription_info.tpl"}
{else}
<tr><td class="ProductPriceConverting" valign="top">{$lng.lbl_price}:</td>
  <td valign="top">{if $product.taxed_price ne 0 || $variant_price_no_empty} <font class="ProductDetailsTitle"><span id="product_price" style="white-space: nowrap;">{include file="currency.tpl" value=$product.taxed_price plain_text_message=true}</span></font><font class="MarketPrice"> <span id="product_alt_price" style="white-space: nowrap;">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price plain_text_message=true}</span></font> {if $product.taxes}<br />
    {include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if} {else}
    <input type="text" size="7" name="price" />
{/if} </td>
  <td valign="top">
<input type=hidden name=amount value="1">
{if $variants eq ''}
{include file="customer/main/product_prices.tpl"}
{/if}
{if $js_enabled}
<BR>
{if $smarty.get.pconf ne ""}
<INPUT type="hidden" name="slot" value="{$smarty.get.slot}">
<INPUT type="hidden" name="addproductid" value="{$product.productid}">
{include file="buttons/button.tpl" button_title=$lng.lbl_pconf_add_to_configuration style="button" href="javascript:if (FormValidation()) `$ldelim`document.orderform.productid.value='`$smarty.get.pconf`';document.orderform.action='pconf.php';document.orderform.submit()`$rdelim`"}
<BR><BR>
{/if}
{if $product.forsale ne "B"}
{include file="buttons/add_to_cart.tpl" style="button" align="right" href="javascript: if(FormValidation()) document.orderform.submit();"}
{if $login ne "" and $active_modules.Wishlist ne ""}
{include file="customer/add2wl.tpl"}
{/if}
{else}
{$lng.txt_pconf_product_is_bundled}
{/if}
{else}
{include file="submit_wo_js.tpl" value=$lng.lbl_add_to_cart}
{/if}
</td>
</tr>
{/if}
</table>


Piotr M. 08-22-2008 10:34 AM

Re: Bah these tables! Anyone care to point out my error?
 
Maybe this is what you need
Code:

<table width="100%" cellpadding="0" cellspacing="0">
<tr><td width="60%">
<table width="100%" cellpadding="0" cellspacing="0">
        <tr><td colspan="3"><b><font class="ProductDetailsTitle">{$lng.lbl_details}</font></b></td></tr>
        <tr><td class="Line" height="1" colspan="3"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td></tr>
        <tr><td colspan="3">&nbsp;</td></tr>
        <tr>
            <td width="30%">{$lng.lbl_sku}</td>
            <td nowrap="nowrap" id="product_code">{$product.productcode}</td>
            <td nowrap="nowrap" id="product_code">&nbsp;</td>
        </tr>
        {if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""}
                <tr>
                    <td width="30%">{$lng.lbl_in_stock}</td>
                    <td nowrap="nowrap" id="product_avail_txt">{if $product.avail gt 0}{$lng.txt_items_available|substitute:"items":$product.avail}{else}{$lng.lbl_no_items_available}{/if} </td>
                    <td nowrap="nowrap" id="product_avail_txt">&nbsp;</td>
                </tr>
        {/if}
        {if $product.weight ne "0.00" || $variants ne ''}
        <!-- <tr id="product_weight_box">
            <td width="30%">{$lng.lbl_weight}</td>
            <td nowrap="nowrap"><span id="product_weight">{$product.weight|formatprice}</span> {$config.General.weight_symbol}</td>
        </tr> -->
        {/if}
        {if $active_modules.Extra_Fields ne ""}
                {include file="modules/Extra_Fields/product.tpl"}
        {/if}
        {if $active_modules.Feature_Comparison ne ""}
                {include file="modules/Feature_Comparison/product.tpl"}
        {/if}
        {if $active_modules.Subscriptions ne "" and $subscription}
                {include file="modules/Subscriptions/subscription_info.tpl"}
        {else}
                <tr>
                        <td class="ProductPriceConverting" valign="top">{$lng.lbl_price}:</td>
                        <td valign="top">
                                {if $product.taxed_price ne 0 || $variant_price_no_empty}
                                        <font class="ProductDetailsTitle"><span id="product_price" style="white-space: nowrap;">{include file="currency.tpl" value=$product.taxed_price plain_text_message=true}</span></font><font class="MarketPrice"> <span id="product_alt_price" style="white-space: nowrap;">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price plain_text_message=true}</span></font>
                                        {if $product.taxes}<br />
                                                {include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if}
                                {else}
                                        <input type="text" size="7" name="price" />
                                {/if}
                        </td>
                        <td valign="top">
                                <input type=hidden name=amount value="1">
                                {if $variants eq ''}
                                        {include file="customer/main/product_prices.tpl"}
                                {/if}
                        </td>
                </tr>
        {/if}
</table>
</td><td>{if $js_enabled}
<BR>
{if $smarty.get.pconf ne ""}
<INPUT type="hidden" name="slot" value="{$smarty.get.slot}">
<INPUT type="hidden" name="addproductid" value="{$product.productid}">
{include file="buttons/button.tpl" button_title=$lng.lbl_pconf_add_to_configuration style="button" href="javascript:if (FormValidation()) `$ldelim`document.orderform.productid.value='`$smarty.get.pconf`';document.orderform.action='pconf.php';document.orderform.submit()`$rdelim`"}
<BR><BR>
{/if}
{if $product.forsale ne "B"}
{include file="buttons/add_to_cart.tpl" style="button" align="right" href="javascript: if(FormValidation()) document.orderform.submit();"}
{if $login ne "" and $active_modules.Wishlist ne ""}
{include file="customer/add2wl.tpl"}
{/if}
{else}
{$lng.txt_pconf_product_is_bundled}
{/if}
{else}
{include file="submit_wo_js.tpl" value=$lng.lbl_add_to_cart}
{/if}</td></tr></table>


ReadytoCover 08-22-2008 11:27 AM

Re: Bah these tables! Anyone care to point out my error?
 
Ah that worked!

Thank you so much!

JWait 08-24-2008 06:55 AM

Re: Bah these tables! Anyone care to point out my error?
 
Pardon my intrusion but am I the only one that finds it kind of humorous that you, a person selling tables, is having a problem with the tables in x-cart? :)

Anyway, I'm glad you got your problem sorted out and reading this thread was a good way to start my day.

carpeperdiem 08-24-2008 06:59 AM

Re: Bah these tables! Anyone care to point out my error?
 
Quote:

Originally Posted by JWait
Pardon my intrusion but am I the only one that finds it kind of humorous that you, a person selling tables, is having a problem with the tables in x-cart? :)


LOL!

ReadytoCover 08-24-2008 09:17 AM

Re: Bah these tables! Anyone care to point out my error?
 
Hahaha! I hadn't even thought of that...good one!

Emerson 08-24-2008 10:10 AM

Re: Bah these tables! Anyone care to point out my error?
 
Quote:

Originally Posted by JWait
Pardon my intrusion but am I the only one that finds it kind of humorous that you, a person selling tables, is having a problem with the tables in x-cart? :)


Priceless!! LOL


All times are GMT -8. The time now is 03:44 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.