Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

having html code in partial product title: <b>.....</b> .....


VladDrakul

Recommended Posts

I have added html code to part of the product title, something like this

 

<b>beginning of product name</b> end of product name

 

The problem is when someone passes the mouse over an image it appears the html code as name.

Any idea how to solve this?

Link to comment
Share on other sites

I have added html code to part of the product title, something like this

 

<b>beginning of product name</b> end of product name

 

The problem is when someone passes the mouse over an image it appears the html code as name.

Any idea how to solve this?

Undo the edit and make your change in stylesheet.css

Link to comment
Share on other sites

Try to use strip_tags

For example in product_info.php find

addslashes($product_info['products_name'])

and replace with

strip_tags($product_info['products_name'])

I think you will be able to have the titles something like

<b>PEARL JAM</b> - album name - CD

And when someone passes the mouse over the product image the html code will be removed.

Link to comment
Share on other sites

Or better, try to use both addslashes and strip_tags

 

In this case, in product_info.php you will have to replace

addslashes($product_info['products_name'])

with

addslashes(strip_tags($product_info['products_name']))

Link to comment
Share on other sites

This will remove the mouse over name in all store or just in the product_info.php file?

For instance on the specials zone or in the new products zone the name of the product will appear when someone passes with the mouse?

Link to comment
Share on other sites

This will remove the mouse over name in all store or just in the product_info.php file?

For instance on the specials zone or in the new products zone the name of the product will appear when someone passes with the mouse?

My example was only for product_info.php.

 

For specials.php you have to find:

tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'],

and replace with

tep_image(DIR_WS_IMAGES . $specials['products_image'], addslashes(strip_tags($specials['products_name'])),

for includes\modules\new_products.php find:

tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'],

and replace with

tep_image(DIR_WS_IMAGES . $new_products['products_image'], addslashes(strip_tags($new_products['products_name'])),

for products_new.php find

tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'],

and replace with:

tep_image(DIR_WS_IMAGES . $products_new['products_image'], addslashes(strip_tags($products_new['products_name'])),

for shopping_cart.php find

tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'],

and replace with

tep_image(DIR_WS_IMAGES . $products[$i]['image'], addslashes(strip_tags($products[$i]['name'])),

Link to comment
Share on other sites

Did any of this work for you, Nuno? It didn't work for me.

 

I use a line break <br> in my titles and it's not being removed from the mouseover on the thumbnail photos.

Link to comment
Share on other sites

what I did was simple, I removed the products_name from the code.

 

Changed the code from this:

['products_name']

 

to this:

['']

 

now in the specific pages I wanted to remove the mouseover effect nothing appears now!

Link to comment
Share on other sites

Did any of this work for you, Nuno? It didn't work for me.

 

I use a line break <br> in my titles and it's not being removed from the mouseover on the thumbnail photos.

Puggybelle I don't know it doesn't work for you.

I tried with <br> and it also work. I found out that it's better use strip_tags($specials['products_name']) instead of addslashes(strip_tags($specials['products_name'])).

I have also made a small clip you can watch it here.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...