Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Show product description on cart_details.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-16-2009, 02:01 AM
 
retrtrtrytrutru retrtrtrytrutru is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 101
 

Default Show product description on cart_details.tpl

Hi,

I have been trying for hours now but I can't figure this out. I want to include the product description on the last page of the checkout process but it's simply not showing up.

File: customer\main\cart_details.tpl

In there I have the following code:

Code:
{$product.product|truncate:"30":"...":true}

I don't want to show $product.product as it's not desriptive enough. So, I thought I would simply replace it:

Code:
{$product.descr}

But of course it doesn't work. Anyone has any idea why this simply does not work? The code I am now using is from cart.tpl in which it works fine...

Thanks in advance!

Ps. This is from X-Cart v4.2.0, not the one from my signature.
__________________
www.qualitylamps.eu
X-Cart Gold 4.1.8, PHP 5.2.6, MySQL 5.0.51a, Apache 2.2.9

www.vervangjelamp.nl
X-Cart Gold 4.2.0, PHP 5.2.6, MySQL 5.0.37-standard, Apache/2

Sorry for the weird user name, I registered it by mistake
Reply With Quote
  #2  
Old 03-19-2009, 02:13 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Show product description on cart_details.tpl

It is in your customer\main\cart.tpl
Code:
<td class="details"> <a href="product.php?productid={$product.productid}" class="product-title">{$product.product}</a> <p class="descr">{$product.descr}</p>

UPD For the last page of the checkout it is
customer\main\cart_contents.tpl
Code:
{foreach from=$products item=product name=products} <tr{interline class="subhead-row" index=$smarty.foreach.products.index total=$list_length}> <td>{$product.productcode}</td> <td>{$product.product|truncate:30:"...":true}</td> {if $cart.display_cart_products_tax_rates eq "Y"} <td class="cart-column-tax">
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #3  
Old 05-31-2009, 05:41 PM
 
WarrenWood WarrenWood is offline
 

Newbie
  
Join Date: Apr 2009
Posts: 8
 

Default Re: Show product description on cart_details.tpl

I am looking for the same fix. Did you get it resolved? If so, can you post the code you put in and where.



Thanks



Quote:
Originally Posted by retrtrtrytrutru
Hi,

I have been trying for hours now but I can't figure this out. I want to include the product description on the last page of the checkout process but it's simply not showing up.

File: customer\main\cart_details.tpl

In there I have the following code:

Code:
{$product.product|truncate:"30":"...":true}

I don't want to show $product.product as it's not desriptive enough. So, I thought I would simply replace it:

Code:
{$product.descr}

But of course it doesn't work. Anyone has any idea why this simply does not work? The code I am now using is from cart.tpl in which it works fine...

Thanks in advance!

Ps. This is from X-Cart v4.2.0, not the one from my signature.
__________________
X-Cart version 4.2.1
Reply With Quote
  #4  
Old 08-22-2009, 11:42 PM
 
Monkeyhead Monkeyhead is offline
 

Member
  
Join Date: Jun 2009
Posts: 14
 

Default Re: Show product description on cart_details.tpl

Did anyone manage to fix this. I am looking for a solution on how to display the descr in the cart details.

I'm also using fast lane checkout.
__________________
xcart 4.1.12
Reply With Quote
  #5  
Old 08-23-2009, 01:20 AM
 
Monkeyhead Monkeyhead is offline
 

Member
  
Join Date: Jun 2009
Posts: 14
 

Default Re: Show product description on cart_details.tpl

Got it!

Find the file include/func/func.cart.php

In the file find the code:
Code:
# # Set the fields filter to avoid storing too much redundant data # in the session # list($tmp_k, $tmp_v) = each($cart["products"]); foreach(array_keys($tmp_v) as $k) $product_keys[] = $k; unset($tmp_k, $tmp_v); reset($cart["products"]); $product_keys[] = "cartid"; $product_keys[] = "product"; $product_keys[] = "productcode"; $product_keys[] = "product_options";
[/php]

Add this line to the product keys

Code:
$product_keys[] = "descr";

Then in customer/main/cart_details.tpl you can add the {$products[prod_num].descr|truncate:"30":"...":true} where required.
__________________
xcart 4.1.12
Reply With Quote
  #6  
Old 08-28-2009, 08:50 AM
 
dwpers dwpers is offline
 

Senior Member
  
Join Date: Aug 2009
Location: Washington D.C.
Posts: 136
 

Default Re: Show product description on cart_details.tpl

Interesting Monkeyhead. Do you know if this works for 4.2.2?
__________________
X-Cart Pro 4.2.2
Reply With Quote
  #7  
Old 10-06-2009, 08:01 AM
 
victor victor is offline
 

Member
  
Join Date: Jan 2003
Posts: 14
 

Default Re: Show product description on cart_details.tpl

I haven't found this answer either. Anyone else know how to fix this in 4.2.2?
__________________
http://www.vandahobbies.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:50 PM.

   

 
X-Cart forums © 2001-2020