Title product + basic html

Phoca Cart - complex e-commerce extension
mjmartino
Phoca Enthusiast
Phoca Enthusiast
Posts: 64
Joined: 10 Jun 2019, 15:53

Title product + basic html

Post by mjmartino »

Hi Jan,

This is possible add HTML tag to Title product, or turn off cleaning HTML from this fields.
Or maybe you know some other way to add some basic format html.

example.
Title product 300x300cm word 15m
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title product + basic html

Post by Jan »

Hi, unfortunately the HTML is stripped when saving to database, so the value is stored without formatting. So then it is not possible to format it this way.

The only way is to customize the XML:
administrator\components\com_phocacart\models\forms\phocacartitem.xml

FROM:

Code: Select all

<field name="title" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_TITLE_LABEL" description="COM_PHOCACART_FIELD_TITLE_DESC" required="true"/>
TO:

Code: Select all

<field name="title" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_TITLE_LABEL" description="COM_PHOCACART_FIELD_TITLE_DESC" required="true" filter="raw"/>
But of course, this edited file needs to be stored as backup and reloaded after update.

Jan
If you find Phoca extensions useful, please support the project
mjmartino
Phoca Enthusiast
Phoca Enthusiast
Posts: 64
Joined: 10 Jun 2019, 15:53

Re: Title product + basic html

Post by mjmartino »

Thank you, Jan!
This is small shop, once set it will not be changed.

Regards.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title product + basic html

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
mjmartino
Phoca Enthusiast
Phoca Enthusiast
Posts: 64
Joined: 10 Jun 2019, 15:53

Re: Title product + basic html

Post by mjmartino »

I change, but is another problem.
In front of title have HTML tags

Image
Any fix?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title product + basic html

Post by Jan »

Hi, then you need to do own title e.g. per override of this output file:

components/com_phocacart/views/item/tmpl/default.php

line 185

Code: Select all

echo PhocacartRenderFront::renderHeader(array($title));
to your own title.
If you find Phoca extensions useful, please support the project
Post Reply