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)
-   -   Product Page Template Editing (https://forum.x-cart.com/showthread.php?t=22060)

Richxcart 05-25-2006 11:13 AM

Product Page Template Editing
 
Hey

Thanks in advance for any help given.

I am attempting to move the product description that shows on the detailed page view underneath the image, and move the price, quantity, and ordering stuff in place of the description. This way the price and that block of information is to the right of the image, and the description is down below all that. The reason being, if there is a large chunk of text, you have to scroll down a lot. I opened up the product.tpl file and moved it, but then I get some smarty class error. Any help would be great!

Thanks

Weston

balinor 05-25-2006 11:18 AM

I'll need to know the exact version you are using...can you update your signature to reflect this? You can find your exact version on the Summary page of your X-Cart admin area.

firelight 05-25-2006 11:21 AM

I'm using dreamweaver to modify all my *.tpl files. Because I'm not a programmer, dreamweaver gives me some visual feedback in terms of changin stuff around in tables.

Richxcart 05-25-2006 11:32 AM

Details moving
 
Quote:

Originally Posted by balinor
I'll need to know the exact version you are using...can you update your signature to reflect this? You can find your exact version on the Summary page of your X-Cart admin area.


Sorry, I thought it was. That would be X-Cart Pro v4.1.1.

I have plenty of knowledge with programming, and web design, so don't worry with anything you say, it probably will not scare me. I use Dreamweaver 8 and I don't see why it doesn't work.

Anyways, thanks again for your help so far:).

balinor 05-25-2006 11:33 AM

Please update your signature to reflect the correct version: Edit profile, enter version, enter help desk password, click the 'Always attach my signature:' box, save.

In order to use Dreamweaver to view Smarty, you need a plug-in:

http://smartydwt.klitsche.org/

Richxcart 05-25-2006 11:46 AM

Quote:

Originally Posted by balinor
Please update your signature to reflect the correct version: Edit profile, enter version, enter help desk password, click the 'Always attach my signature:' box, save.

In order to use Dreamweaver to view Smarty, you need a plug-in:

http://smartydwt.klitsche.org/


Ok, but why do you need that? I made the changes, but when I actually go out to view it it shows me that error?

balinor 05-25-2006 11:51 AM

We need the version because there are over 40 versions of X-Cart, and each one of them is different.

The templates contain Smarty tags...if you move things without taking them into consideration, you break the crucial {if} statements...which will give you an error.

Richxcart 05-25-2006 11:53 AM

Ok, I gave you the version like four posts ago in the body of the message. Pro v. 4.1.1. I also updated my signature.

Thanks

balinor 05-25-2006 11:54 AM

I know, but I'm asking you to update your signature...which you have not done yet (it still reads 4.0)

firelight 05-25-2006 12:10 PM

All I have to do to make the full description appear on the bottom is place:
Quote:

{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}
right before
Quote:

{/capture}
aproximately line 160 in customer/main/product.tpl
Just tried it out myself at temp site http://www.firelight.ca/xcart/product.php?productid=49&cat=14&page=1

Grant 05-25-2006 12:16 PM

Quote:

Originally Posted by balinor
Please update your signature to reflect the correct version: Edit profile, enter version, enter help desk password, click the 'Always attach my signature:' box, save.

In order to use Dreamweaver to view Smarty, you need a plug-in:

http://smartydwt.klitsche.org/


I have installed the Smarty for DW plug in on 2 different versions on 2 different computers and it works on neither. I get this error :

http://www.wyzeshop.com/screenshot7.jpg

Any ideas?

firelight 05-25-2006 12:24 PM

Did you read the following:
Quote:

I get the following warning message when starting Dreamweaver:

The Document Type "Smarty Template" will not be added because it uses a file extension
that is already associated with a prior Document Type."

What now?The document type "tpl" was already registered when you installed SmartyDWT. Maybe you added this yourself or some other extensions did it or you have got a newer version of Dreamweaver MX 2004 in which "tpl" is registered by default.
There are 2 ways to remove the the warning:
[a] Update to the newest version (1.3.2) of SmartyDWT.
Do NOT install the SmartyDWT Document Type addon.
[b] Fix
in http://smartydwt.klitsche.org/

weswhite 05-26-2006 06:08 AM

Here is the template code I am using. This is the same person as was using richxcart, I just got my own login and no longer have to use my boss's.

Code:

{* $Id: product.tpl,v 1.147 2006/04/08 06:41:56 max Exp $ *}
{include file="main/include_js.tpl" src="main/popup_image.js"}
{if $active_modules.Special_Offers}
{include file="modules/Special_Offers/customer/product_offers_short_list.tpl" product=$product}
{/if}
{include file="form_validation_js.tpl"}
{if $product.product_type eq "C" && $active_modules.Product_Configurator}
{include file="modules/Product_Configurator/pconf_customer_product.tpl"}
{else}
{capture name=dialog}
<form name="orderform" method="post" action="cart.php?mode=add" onsubmit="javascript: return FormValidation();">
<table width="100%">
<tr>
        <td valign="top">



<table cellpadding="0" cellspacing="0" width="100%">
<tr>
        <td class="PImgBox">
{if $product.taxed_price gt 0 and $product.list_price gt 0}
<table cellpadding="0" cellspacing="0" width="127" id="save_percent_box"{if $product.taxed_price ge $product.list_price} style="display: none;"{/if}>
<tr>
        <td class="SaveMoneyLabel">
{$lng.lbl_save}{math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount}
<span id="save_percent">{ $discount }</span>%
        </td>
</tr>
<tr>
        <td></td>
</tr>
</table>
{/if}


{if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'}
{include file="modules/Detailed_Product_Images/popup_image.tpl"}
{else}
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}
{/if}
{if $active_modules.Magnifier ne "" && $config.Magnifier.magnifier_image_popup eq 'Y' && $zoomer_images ne '' && $js_enabled eq 'Y'}
{include file="modules/Magnifier/popup_magnifier.tpl"}
{/if}
        </td>
<td>[img]{$ImagesDir}/spacer.gif[/img]</td>
<td valign="top">
<span>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}</span>
</td>
</tr>
</table>



{include file="main/subheader.tpl" title=$lng.lbl_details}
<table width="100%" cellpadding="0" cellspacing="0">
{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"><span id="product_avail_txt">{if $product.avail gt 0}{$lng.txt_items_available|substitute:"items":$product.avail}{else}{$lng.lbl_no_items_available}{/if}</span></td></tr>
{/if}
{if $product.weight ne "0.00"}<tr><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="ProductPriceTitle"><span id="product_price">{include file="currency.tpl" value=$product.taxed_price}</span></font><font class="MarketPrice"> <span id="product_alt_price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</span></font>
{if $product.taxes}
{include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if}
{else}
<input type="text" size="7" name="price" />
{/if}
</td>
</tr>
{/if}
</table>



{include file="main/subheader.tpl" title=$lng.lbl_options}
<table width="100%" cellpadding="0" cellspacing="0">
{if $active_modules.Product_Options ne ""}
{ include file="modules/Product_Options/customer_options.tpl"}
{/if}
<tr><td height="25" width="30%">{$lng.lbl_quantity}{if $product.min_amount gt 1}
<font class="ProductDetailsTitle">{$lng.txt_need_min_amount|substitute:"items":$product.min_amount}</font>{/if}</td>
<td>
{if $config.General.unlimited_products eq "N" and ($product.avail le 0 or $product.avail lt $product.min_amount) and $variants eq ''}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = 1;
var avail = 0;
var product_avail = 0;
-->
</script>
{$lng.txt_out_of_stock}
{else}
{if $config.General.unlimited_products eq "Y"}
{math equation="x+1" assign="mq" x=$config.Appearance.max_select_quantity}
{else}
{math equation="x/y" x=$config.Appearance.max_select_quantity y=$product.min_amount assign="tmp"}
{if $tmp<2}
{assign var="minamount" value=$product.min_amount}
{else}
{assign var="minamount" value=1}
{/if}
{math equation="min(maxquantity+minamount, productquantity+1)" assign="mq" maxquantity=$config.Appearance.max_select_quantity minamount=$minamount productquantity=$product.avail}
{/if}
{if $product.distribution eq "" and !($active_modules.Subscriptions ne "" and $subscription)}
{if $product.min_amount le 1}
{assign var="start_quantity" value=1}
{else}
{assign var="start_quantity" value=$product.min_amount}
{/if}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = {$start_quantity|default:1};
var avail = {$mq|default:1}-1;
var product_avail = {$product.avail|default:"0"};
-->
</script>
<select id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_wholesale(this.value);"{/if}>
{section name=quantity loop=$mq start=$start_quantity}
<option value="{%quantity.index%}" {if $smarty.get.quantity eq %quantity.index%}selected{/if}>{%quantity.index%}</option>
{/section}
</select>
{else}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = 1;
var avail = 1;
var product_avail = 1;
-->
</script>
<font class="ProductDetailsTitle">1</font><input type="hidden" name="amount" value="1" /> {if $product.distribution ne ""}{$lng.txt_product_downloadable}{/if}
{/if}
{/if}
</td></tr>
<tr><td colspan="2">
<input type="hidden" name="mode" value="add" />
{include file="customer/main/product_prices.tpl"}
{if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)}
{if $js_enabled}


{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`"}



{/if}
{if $product.forsale ne "B"}
<table cellspacing="0" cellpadding="0">
<tr>
        <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
        <td></td>
        <td>
{if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne ""}
{include file="customer/add2wl.tpl"}
{/if}
        </td>
</tr>
</table>
{else}
{$lng.txt_pconf_product_is_bundled}
{/if}
{else}
{include file="submit_wo_js.tpl" value=$lng.lbl_add_to_cart}
{/if}
{/if}
{if $active_modules.Feature_Comparison ne ""}
{include file="modules/Feature_Comparison/product_buttons.tpl"}
{/if}



</td>
</tr></table>
</td>
</tr>
</table>
<input type="hidden" name="productid" value="{$product.productid}" />
<input type="hidden" name="cat" value="{$smarty.get.cat|escape:"html"}" />
<input type="hidden" name="page" value="{$smarty.get.page|escape:"html"}" />
</form>
{/capture}
{include file="dialog.tpl" title=$product.producttitle content=$smarty.capture.dialog extra='width="100%"'}
{/if}
{if $active_modules.Magnifier ne "" && ($config.Magnifier.magnifier_image_popup ne 'Y' || $js_enabled ne 'Y')}



{include file="modules/Magnifier/product_magnifier.tpl" productid=$product.productid}
{/if}
{if $config.Appearance.send_to_friend_enabled eq 'Y'}



{include file="customer/main/send_to_friend.tpl" }
{/if}
{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')}



{include file="modules/Detailed_Product_Images/product_images.tpl" }
{/if}
{if $active_modules.Upselling_Products ne ""}



{include file="modules/Upselling_Products/related_products.tpl" }
{/if}
{if $active_modules.Recommended_Products ne ""}



{include file="modules/Recommended_Products/recommends.tpl" }
{/if}
{if $active_modules.Customer_Reviews ne ""}



{include file="modules/Customer_Reviews/vote_reviews.tpl" }
{/if}
{if $active_modules.Product_Options ne '' && $product_options ne ''}
<script type="text/javascript" language="JavaScript 1.2">
<!--
check_options();
-->
</script>
{/if}



All times are GMT -8. The time now is 12:35 PM.

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