No replies
Axel_Pressbutton's picture
Offline
Joined: 11/30/2008
Juice: 123
Was this information Helpful?

Hi,

I'm using UC 2.x and trying to get a product 'Description' to show below the 'Title' after a product has been added and the user is viewing /cart

Does it make any difference if I am trying to do this via cart links?

looking at uc_cart.module...is the following code (lines 860-883) trying to do this already?

Thanks, any help greatly appreciated as ever.

<?php
  $i
= 0;
  foreach (
$items as $item) {
   
$display_item = module_invoke($item->module, 'cart_display', $item);
    if (!empty(
$display_item)) {
     
$form['items'][$i] = $display_item;
     
$form['items'][$i]['image']['#value'] = uc_product_get_picture($display_item['nid']['#value'], 'cart');

     

$description = $display_item['title']['#value'] . $display_item['description']['#value'];
     
$form['items'][$i]['desc']['#value'] = $description;

     

$form['items'][$i]['title']['#type'] = 'value';
     
$form['items'][$i]['description']['#type'] = 'value';

      if (empty(

$display_item['qty'])) {
       
$form['items'][$i]['qty'] = array(
         
'#value' => '',
        );
      }
     
$form['items'][$i]['total'] = array(
       
'#value' => $display_item['#total'],
       
'#theme' => 'uc_cart_view_price',
      );
     
$i++;
    }
?>

In fact, while I'm on the subject of /cart....does anyone know if there's an option anywhere to stop the thumbnail image linking through to the product page for non-logged in users? I've noticed that the super-admin user sees the title and thumbnail both as links to the product page and visitors to the site will see standard text for the title, but when there, the thumbnails still link through.