Hello,
Can anybody help with Title.
I want to echo title in product page like this -> Category name+Product name
In catalog->controller->product.php I found
this code: (line:62)
$template->set('title', $product_info['name']);
Can anobody help me how I can do this? I am not very competent with arrays.
The breadcrumb on the page already shows this information and more but...
in response to your actual question, line 26 of the same file shows where the array is populated.
ie:
You would need to modify the select statement to join with
Now your title would be
in response to your actual question, line 26 of the same file shows where the array is populated.
ie:
Code: Select all
$product_info = $database->getRow("select * from product p left join product_description pd on (p.product_id = pd.product_id) left join image i on (p.image_id = i.image_id) where p.product_id = '" . (int)$request->get('product_id') . "' and pd.language_id = '" . (int)$language->getId() . "' and p.date_available < now() and p.status = '1'");
- product_to_category to give you the category_id of the product
- category_description to give you the name of the category (need to alias 'name' from this table this as, say 'category_name'
Now your title would be
Code: Select all
$product_info['category_name'] . ' ' . $product_info['name']
Who is online
Users browsing this forum: No registered users and 3 guests