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)
-   -   short description for three columns (https://forum.x-cart.com/showthread.php?t=42033)

sam22 08-28-2008 06:01 AM

short description for three columns
 
can someone please tell me how to have the short descriptions show up when i use a three column format?
thanks,
bhb

pauldodman 08-28-2008 06:15 AM

Re: short description for three columns
 
When you move to a column display the template changes from
skin1/customer/main/products.tpl
to
skin1/customer/main/products_t.tpl

So you need to edit this template accordingly. If you look at the first template, you will find the bits of code you need - in this case you want:

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

So put that in where you need it.

sam22 08-28-2008 06:22 AM

Re: short description for three columns
 
sorry to be a bother, but smarty is new to me, can you tell me where i put this code so it shows up centered and in lieu of see details?

boomobile 08-28-2008 04:04 PM

Re: short description for three columns
 
If you are familiar with HTML, then you can cut and paste the entire tpl code into dreamweaver (or other wysiwyg editor) and you can see the general layout of where everything is placed. Open a new html file, switch to "code view" locate the <body> </body> tags and paste between them. Now you can switch to "design view" to see the general layout.
You won't view the actual page or any of the CSS edits, but you will see where you need to place the code. Be careful not to break any other code when you place the smarty tag, and use the "code view" to place the tag.
Remember to only copy your tpl code when pasting back into your tpl file. Also Dreamweaver has a nasty habit of adding extra spaces and hard returns. You'll want get rid of any "tabbing" dreamweaver does.

nivag 01-20-2009 12:34 PM

Re: short description for three columns
 
Wanted to do this aswell in 4.2 and after some failures found this works:

<p class="descr">{$product.descr}</p>

I got it to display under the SKU code at the top of the item by adding it below:

{if $config.Appearance.display_productcode_in_list eq "Y" && $product.productcode}
<div class="sku">{$lng.lbl_sku}: {$product.productcode|escape}</div>
{/if}

Hope that helps others on 4.2

kevingibson 05-01-2009 08:18 AM

Re: short description for three columns
 
Thank you Nivag this worked well in 4.2 - why they didnt just leave it in amazes me, it should have been an option in the admin.

AusNetIT 05-10-2009 12:05 AM

Re: short description for three columns
 
Quote:

Originally Posted by pauldodman
When you move to a column display the template changes from
skin1/customer/main/products.tpl
to
skin1/customer/main/products_t.tpl

So you need to edit this template accordingly. If you look at the first template, you will find the bits of code you need - in this case you want:

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

So put that in where you need it.



Under my Prodtucts_t.tpl

i have change to this but nothing happen?


<div class="ProdTitle"><a href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}" class="ProductTitle">{$products[product].product|truncate:100:"...":true}</a><br />
{if $config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""}
<font class="SmallText">{$lng.lbl_sku}: {$products[product].productcode}</font><br />
{/if}</div>

AusNetIT 05-12-2009 03:15 AM

Re: short description for three columns
 
Thanks,

found in products.tpl and all sorted.


All times are GMT -8. The time now is 01:36 AM.

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