Post by FinrodFelegund » Sun Jan 10, 2010 4:12 am

So now on product listing on categories ppl can see the following information : name, model, and price. I managed to add wieght there but i would also like to add the product description there but i am stuck with those controller classes
In catalog/controller/product/category.php - somewhere about line 144 i have this:

Code: Select all

	
$this->data['products'][] = array(
            			'name'    => $result['name'],
						'model'   => $result['model'],
                                                'weight'   => $result['weight'],
                                             
            			'rating'  => $rating,
						'stars'   => sprintf($this->language->get('text_stars'), $rating),
						'thumb'   => image_resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
            			'price'   => $price,
						'special' => $special,
						'href'    => $this->model_tool_seo_url->rewrite($this->url->http('product/product&path=' . $this->request->get['path'] . '&product_id=' . $result['product_id']))
          			);
        		}
How could i add in this array the product description , after that i think i can manage it to echo it in template and style it a bit on a div....

----------------------------------------------------------------------------------------------------------
owner and manager of - superproduse.com


New member

Posts

Joined
Thu Aug 20, 2009 7:15 pm


Post by Qphoria » Sun Jan 10, 2010 4:43 am

you're in the right spot. Now just add it:

Code: Select all

 'description'    => $result['description'],

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by FinrodFelegund » Sun Jan 10, 2010 5:02 am

that worked, take a look at:

Code: Select all

 http://superproduse.com/super_oferte_electronice/produse_resigilate 
the out put include the paragraph tag <p> i think i saw something somewhere to take that off...but i do not seem to find it anymore...

----------------------------------------------------------------------------------------------------------
owner and manager of - superproduse.com


New member

Posts

Joined
Thu Aug 20, 2009 7:15 pm


Post by FinrodFelegund » Sun Jan 10, 2010 5:05 am

foun it :d
'description' => html_entity_decode($result['description']),

this works perfect..it's adding a space but i think i can fix it ...thx man!!

----------------------------------------------------------------------------------------------------------
owner and manager of - superproduse.com


New member

Posts

Joined
Thu Aug 20, 2009 7:15 pm

Who is online

Users browsing this forum: Bing [Bot] and 19 guests