Jump to content
  • 0

Tagi HTML w polu cech produktu


JDStar

Question

W jaki sposób pozwolić na używanie tagów HTML w polu z cechami produktu?

Presta 1.6.0.5, w klasie FeatureValue zmieniłem:

'value' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 5000)

Niestety w dalszym ciągu przy zapisie Presta czyści mi wszystkie tagi.

Gdzie jeszcze szukać jakiegoś validatora, który mi to czyści?

Edited by JDStar (see edit history)
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Rozwiązałem problem - oprócz tego co powyżej to w klasie Product.php musimy dodać parametr zezwalający na HTML w zapisie do bazy pSQL($cust, true):

public function addFeaturesCustomToDB($id_value, $lang, $cust)
	{
		$row = array('id_feature_value' => (int)$id_value, 'id_lang' => (int)$lang, 'value' => pSQL($cust, true));
		return Db::getInstance()->insert('feature_value_lang', $row);
	}
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...