Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - CleanMart (SKU# FLEX-00015)

TOPIC: HTML Tags on category view

HTML Tags on category view 9 years 4 months ago #11618

i am using a plugin which allows me to display text based on access levels. link to plugin: www.greatjoomla.com/tutorials/core-design-access-text-plugin/how-to-setup-core-design-access-text-plugin.html

This works fine in product view pages. My Long Description has this code and based on user levels correct code is displayed.

On the category view i need to display the short description instead of price.

I have accomplished this. I have made changes to short description in virtumart admin is just like long description where i can add html code using an editor "Short description with WYSIWYG and HTML"


My problem now is that Cleanmart strips the html tags in category view.
I have tried this solution but i still have the same problem. www.flexiblewebdesign.com/forum-joomla-virtuemart-template-coolmart-support/1611-wrong-display-when-html-tag-in-short-desc-flypage.

can you please tell me what i can do to stop cleanmart from removing tags? i have attached a screenshot to show you what is happening.
Attachments:
Last Edit: 9 years 4 months ago by dev Mint.
The administrator has disabled public write access.

HTML Tags on category view 9 years 4 months ago #11622

Hi,

I must tell you that "CleanMart" doesn't remove anything. CleanMart truncate the short description on ListView by limitStringByWord() function, which is already a Virtuemart Core function. Allows only 100 word via this PHP expression:
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc, 100, '...') ?>

but this also doesn't remove any HTML line, it just removes the words after 100th.

To print the full short description, below PHP expression should be used (without the limitStringByWord() function)
<?php echo $product->product_s_desc; ?>

Clearing HTML tags from product_s_desc is "Virtuemart Core" related thing and it is taken care in the VM Backend. Once you enter the HTML to the field and click SAVE, the HTML tags are removed and the plain text is saved to the DATABASE. Which is normal, because "short description" is used as META Description (on product details page). If the HTML tags won't be removed, the META Description will include HTML tags. It would destroy the SEO. You shouldn't use HTML within the short description field.

There is one more field you can use, it is called "Internal Notes"
It is a textarea field (just like short description and full description), it is located below the "Product Price" row. (usually nobody notices that field is exist)

Attachment Pasted_Image_12_26_14__6_06_PM.png not found



You can use that field.
To print that field on category page, use this PHP expression:
<?php echo $product->intnotes ?>

To print that field on product page, use this PHP expression:
<?php echo $this->product->intnotes ?>

If you like CleanMart and satisfied with the support you have received, please "write a review" on:
www.flexiblewebdesign.com/Virtuemart-2-Templates/CleanMart

Write couple of sentences to share your experience with the support team.
Just 2-3 sentences would be enough ;) It might sound simple to you, but it is extremely important. Potential customers care about product reviews very much.

Thanks in advance!

Regards,
Support
Last Edit: 9 years 4 months ago by Support.
The administrator has disabled public write access.
Time to create page: 0.327 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo