Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HTML In my Attribute Description is causing trouble in Admin...


FixItPete

Recommended Posts

Posted

Here is the shop in action:

http://www.cashcandle.com/lucky-four-leaf-clover-cash-candle-money-candle-shamrock-p-29.html

 

If you look at the Attributes (Wrapping and Ribbon) -- you'll see that we have HTML code in them (so that people can click to get a pop-up of the different wraps and ribbon color).

 

This work fine except that in Admin it doesn't work.

 

Here is what I get in Admin:

 

Lucky Four Leaf Clover Cash Candle - Money Candle (Shamrock) - Scented or Unscented: Scented "Smells Like Money"

- See Ribbon

 

Which should sho the Ribbon color and wrapping color.

 

 

I am certain that it is in this code:

 

echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];

 

which, if I make it this:

 

echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['1option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];

 

I can get rid of the attribute name, but then I don't know which is which (for lack of a better word)...

 

and I get this:

 

Lucky Star Cash Candle - Lucky Star Money Candle

- : Scented "Smells Like Money"

- : Orange

- : Gold Metallic

 

Is there a way to make it so that it remove the HTML or something so that I can still get the Attribute "title"?

 

Thanks,

Pete :) !

I find the fun in everything.

Posted

Try

echo '<br><nobr><small> <i> - ' . strip_tags($order->products[$i]['attributes'][$j]['option']) . ': ' . $order->products[$i]['attributes'][$j]['value'];

You also might consider changing things so that instead of putting the HTML into the attribute name, you generate it on the fly on the product_info page.

Always back up before making changes.

Posted

Hi Matt!

 

That worked!! Wow! Thank you!!

Appreciate it very much... it's been a rough few months. LOL... I'll take any help I can get.

 

Thanks again!

Pete

I find the fun in everything.

Archived

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

×
×
  • Create New...