Post by Jan R » Fri Oct 30, 2009 3:42 am

Jan here...

I have worked all day and still can not get what i am trying to do to work.

What i am having troubles with is that I am trying to add descriptions to the cart page.
[it is a long story as to why] :-\
But i can't determine how to access the description data
can someone clue me in.

-=:@:=-

»-(¯`·.·´¯)->"The most wasted day in that in which we have not laughed."<-(¯`·.·´¯)-«


User avatar
New member

Posts

Joined
Fri Oct 16, 2009 2:20 am

Post by Qphoria » Fri Oct 30, 2009 11:28 am

1. EDIT: catalog/controller/checkout/cart.php

2. FIND:

Code: Select all

$this->data['products'][] = array(
3. BEFORE, ADD:

Code: Select all

$query = $this->db->query("SELECT description FROM " . DB_PREFIX . "product_description WHERE product_id = '" . $result['product_id'] . "' AND language_id = '" . $this->language->getId() . "'");
4. FIND:

Code: Select all

'name'     => $result['name'],
5. UNDER, ADD:

Code: Select all

'description'     => (isset($query->row['description'])) ? substr(strip_tags(html_entity_decode($query->row['description'], ENT_QUOTES)),0,80) : '',
6. EDIT: catalog/view/theme/YOURTHEME/template/checkout/cart.tpl

7. FIND:

Code: Select all

<td align="right" valign="top"><?php echo $product['total']; ?></td>
8. AFTER ADD:

Code: Select all

</tr>
        <tr><td colspan="7"><?php echo $product['description']; ?></td>

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Jan R » Sat Oct 31, 2009 7:12 am

Jan here...

Wow thanks a lot Qphoria! :-*
I was real close .. I had the correct files, I just could not get the query correct , and a few other bits and code.

-=:@:=-

»-(¯`·.·´¯)->"The most wasted day in that in which we have not laughed."<-(¯`·.·´¯)-«


User avatar
New member

Posts

Joined
Fri Oct 16, 2009 2:20 am
Who is online

Users browsing this forum: No registered users and 4 guests