Post by amrami » Sun Oct 23, 2011 11:08 pm

Hi,

I want to highlight (Bold or different color) part of a product's name,
For example: Silver chain NEW
Is there a way to highlight only part of a product's name?


thanks a zillion

Amrami

איפה הכסף


New member

Posts

Joined
Thu Jun 16, 2011 4:43 pm


Post by uksitebuilder » Mon Oct 24, 2011 12:28 am

If it is only a handful of certain words then you could run a script on the data retrieved in the controller before the template grabs it.

If you know the specific words you want replacing, let me know and I'll knock a bit of code together for you.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by amrami » Mon Oct 24, 2011 7:22 pm

Cool Simon, thanks!

FREE SHIPPING

Thanks again

איפה הכסף


New member

Posts

Joined
Thu Jun 16, 2011 4:43 pm


Post by uksitebuilder » Mon Oct 24, 2011 7:38 pm

ok,

to do this on the product page

edit: catalog/controller/product/product.php

find:

Code: Select all

$this->data['heading_title'] = $product_info['name'];
change to

Code: Select all

$this->data['heading_title'] = str_replace("FREE SHIPPING", "<span style="font-weight:bolder;">FREE SHIPPING</span>', $product_info['name']);
One thing I will note is that your products will most likely be disapproved if you submit them to Google Merchant due to there being promotional text in the title, this is regardless of the modification above.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom
Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 55 guests