Sy memodifikasi tampilan tooltip di product. Biasanya kalo cursor diarahkan ke thumb image yg muncul kan nama produk/barangnya. Skrg sy modifikasi yg muncul description nya. Perubahan/tambahan nya disini -->
$this->data['products'][] = array(
'name' => $result['name'],
'description' => $result['description'],
'model' => $result['model'],
'rating' => $rating,
'stars' => sprintf($this->language->get('text_stars'), $rating),
'thumb' => (class_exists('HelperImage')) ? HelperImage::resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : (class_exists('ModelToolImage')) ? $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : image_resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
'price' => $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))),
'special' => $special,
'href' => $this->model_tool_seo_url->rewrite((HTTP_SERVER . 'index.php?route=product/product' . $url . '&product_id=' . $result['product_id'])),
'add' => $add
);
Yg dicetak tebal adalah sisipan scripy yg baru.
Untuk men-display nya -->
<a href="<?php echo str_replace('&', '&', $products[$j]['href']); ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['description']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a><br />
Masalahnya adalah saya cuma ingin beberapa baris saja dari description yg ditampilkan..karena description terlalu panjang.
Saya coba salahsatu dari 2 cara
1. 'description' => substr($result['description'],5,10),
2.title="<?php echo substr($products[$j]['description'],5,10);
Muncul karakter spt .. < > & quoat .. selain dr isi description itu sendiri
Sedangkan bila tidak memakai substr(x,x,x) maka muncul mulus..hanya saja text tlalu kpanjangan
Silahkan lihat hasilnya bila tdk memakai substr disini http://www.kepajak.com/index.php?route=product/all
Pertolongan para master sgt sgt sy rindukan
