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)
-   -   A little "programming" help needed (new users) (https://forum.x-cart.com/showthread.php?t=2648)

canstamps 05-11-2003 09:53 AM

A little "programming" help needed (new users)
 
I know that this is simple, and may someone can provide this new user with a little free help in programming.

I have set up to "addtional" field. The show up fine in the detail when you select "show setail" BUT I would like them on the priduct listing after the description but before the price.

Can someone "code" this for me.

Much appreciated.

shan 05-12-2003 01:30 AM

this is the code for products.tpl and is from version 3.3.5


Code:

{* $Id: products.tpl,v 1.21.2.2 2003/03/11 10:49:14 svowl Exp $ *}
{section name=product loop=$products}
<table border=0 width=100%>
<tr><td width=90 align=center valign=top>
<a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=70 product=$products[product].product}
{$lng.lbl_see_details}</a>
</td>
<td valign=top>
{$products[product].product}</font>
<font size=1>




{$products[product].descr|truncate:300:"...":true}


</font>

{* BELOW IS THE CODE FOR THE EXTRA FIELDS *}

{if $active_modules.Extra_Fields ne ""}
{include file="modules/Extra_Fields/product.tpl"}
{/if}

{* ABOVE IS THE CODE FOR THE EXTRA FIELDS *}


<hr size=1 noshade width=230 align=left>
{if $active_modules.Subscriptions ne "" and $products[product].catalogprice}
{include file="modules/Subscriptions/subscription_info_inlist.tpl"}
{else}
{if $products[product].price ne 0}
{if $products[product].discount ne 0}
<font class=MarketPrice>{$lng.lbl_market_price}: <s>
{math equation="price/(1-(discount/100))" price=$products[product].price discount=$products[product].discount format="%d.00" assign=unformatted}{include file="currency.tpl" value=$unformatted}
</s></font>

{/if}
<font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].discount ne 0}, save {$products[product].discount}%{/if}{if $config.General.use_vat eq "Y"}, {$lng.lbl_including_vat} {$products[product].vat}%{/if}
{else}
<font class=ProductPrice>{$lng.lbl_enter_your_price}</font>
{/if}
{/if}
</td></tr>
</table>






{/section}


canstamps 05-12-2003 03:15 AM

Thanks, I thought it was simple, but not just 2 lines of code. ':D'

I loaded version 3.4, I will try your code in it.

Another question please, I assume this code will put every additional field on the product screen. Can it be modified to do just the one or two of the fields.

After a few mods, I should be able to do them myself, I do computer consulting for a living but do not yet know PHP.

Thanks again.


All times are GMT -8. The time now is 06:02 AM.

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