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)
-   -   Show product description on cart_details.tpl (https://forum.x-cart.com/showthread.php?t=46301)

retrtrtrytrutru 03-16-2009 02:01 AM

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.

Victor D 03-19-2009 02:13 AM

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">


WarrenWood 05-31-2009 05:41 PM

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.


Monkeyhead 08-22-2009 11:42 PM

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.

Monkeyhead 08-23-2009 01:20 AM

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.

dwpers 08-28-2009 08:50 AM

Re: Show product description on cart_details.tpl
 
Interesting Monkeyhead. Do you know if this works for 4.2.2?

victor 10-06-2009 08:01 AM

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?


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

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