Skip to main content

Adding string to description

More
4 years 1 month ago #343869 by khashiz
-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.1.5
-- PHP version -- : 7.4

Hi,
I want about 100 products in my site which every of them have different descriptions.

I need to add a static string at the end of all of products descriptions.

is that possible with mass actions ?

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #343871 by khashiz
Sorry I meant "I have about 100 product" by "I want about 100 product".
that was a typing mistake.

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #343872 by nicolas
Hi,

Yes. You can use an action "update the values" on the column product_description with the mode "operation" and the value:
Code:
concat(product.product_description, 'my extra text')
The following user(s) said Thank You: khashiz

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #343879 by khashiz
thats why i love this amazing component.

thank you
The following user(s) said Thank You: Philip

Please Log in or Create an account to join the conversation.

More
4 years 3 weeks ago #344357 by khashiz
Hi.

today I tried to use this code.
I put some html instead of "my extra text" and the system returned error.

can't I put html there ?

Please Log in or Create an account to join the conversation.

More
4 years 3 weeks ago - 4 years 3 weeks ago #344358 by khashiz
what I exactly want to do is that if my description's html is :
<p>some text</p>

I want to add :
<div class="class1">some other text</div>
at the end of it.

so the final description would be :
<p>some text</p><div class="class1">some other text</div>

screenshot of the error i get is attached
Last edit: 4 years 3 weeks ago by khashiz.

Please Log in or Create an account to join the conversation.

More
4 years 3 weeks ago #344359 by nicolas
Hi,

HTML is stripped for security reasons.
If you want to temporarily disable that, you can remove the line:
$value = strip_tags($value);
from the file administrator/components/com_hikashop/classes/massaction.php
Then, you'll get the HTML in there too when you process the mass action.

Please Log in or Create an account to join the conversation.

Time to create page: 0.256 seconds
Powered by Kunena Forum