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

TOPIC: Using " (quote) in short description

Using " (quote) in short description 9 years 7 months ago #4067

Hi :) ... again... ;)

I don't know if this is a template problem or VM problem in general:

If we use " in our text in a product's short description field, it kind of fails. Or that is, at the end of a paragraph:
Rally asfaltdekk i 15"<br>Kommer i flere størrelser, og i soft, medium & hard.
We have to use line break, or it doesn't make a new line.

If we use two ' it works.
Rally asfaltdekk i 15''<br>Kommer i flere størrelser, og i soft, medium & hard.

The text after the " and half the tag is displayed all the way on top of the page.

Attachment s-descr-1.jpg not found



(The text is almost the same as the background, so I have highlighted it.)

It is possible to use txo of the ' caracters, but since we're not the only administrators of the VM store, we would prefer it if we could also use the " character.
Because we sell tyres and rims, and their size descriptions are in inches.

What is easier; to allow quotes and tag, or to automatically make a line break like in the long description field...?

:)
Last Edit: 9 years 7 months ago by Christin Larsen.
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4084

a " will break the html

have you tried either

\"

or
&quote;

Cheers
Last Edit: 9 years 7 months ago by John.
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4101

:)

Haven't tried it, but I was hoping for something a little bit more user friendly... (for our admins who aren't going to remember the " or the / ..... ;)

Maybe the VM forum comes up with a solution.. :)

Maybe change the code in administrator/components/com_virtuemart/views/product/tmpl/product_edit_description.php
<fieldset>
 <legend><?php echo JText::_('COM_VIRTUEMART_PRODUCT_FORM_S_DESC') ?></legend>		
 <textarea class="inputbox" name="product_s_desc" id="product_s_desc" cols="65" rows="3" >
 <?php echo $this->product->product_s_desc; ?></textarea>
</fieldset>
 
<fieldset>
 <legend><?php echo JText::_('COM_VIRTUEMART_PRODUCT_FORM_DESCRIPTION') ?></legend>		
 <?php echo $this->editor->display('product_desc', $this->product->product_desc, '100%;', '550', '75', '20', array('pagebreak', 'readmore') ) ; ?>
</fieldset>

Parhaps could the s-desc form also use the text editor?
<textarea class="inputbox" name="product_s_desc" id="product_s_desc" cols="65" rows="3" >
 <?php echo $this->product->product_s_desc; ?></textarea>
 
to
 
<?php echo $this->editor->display('product_s_desc', $this->product->product_s_desc, '100%;', '250', '75', '20', array('pagebreak', 'readmore') ) ; ?>

Or wouldn't this work? I'm asking before I try it out myself, because we have a live site... ;) And I don't know if this change will mess up things for me.. :)
Last Edit: 9 years 7 months ago by Christin Larsen.
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4107

Far more confusing is I just tried it on test.flexiblewebdesign.com/virtuemart-2-template-fashionmart/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=40&Itemid=478

the short desc is

orem ipsum dolor sit amet, " <br />consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud " " <br />exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

and it renders perfectly - why doesn't yours????

this is what renders
 
<div class="product-short-description">
		orem ipsum dolor sit amet, " <br>consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud " " <br>exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.	</div>
Attachments:
Last Edit: 9 years 7 months ago by John.
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4119

Could it be because you wrote
<br />
and we wrote
<br>
?

I will check this in the morning, now it's midnight here, goodnight... :)
Last Edit: 9 years 7 months ago by Christin Larsen.
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4123

Didn't you notice the text on the top of your page? ;)

Attachment test1.jpg not found




No difference with <br />
But with / before the " --- it it displayed as 15/" in the category view.

Attachment s-descr-2.jpg not found

Last Edit: 9 years 7 months ago by Christin Larsen. Reason: forgot to add images...
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4124

So the problem is actually in category view. Because in product detail view, the short description is not displayed.
But too much fuss about the code in the s_desc field (back end) messes up the html in the product detail view.


Attachment s-descr-3.jpg not found


(I use two ' instead of " .)
Last Edit: 9 years 7 months ago by Christin Larsen.
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4127

Nope - didn't notice the text at the top.. he he..
So it#s only the cat view that your worried about?

(BTW it should be \" not /" a backslash ecapes)

(the browser converts my <br /> to <br> but makes no difference)

But anyway - tried in cat view and no problems here..

test.flexiblewebdesign.com/virtuemart-2-template-fashionmart/index.php?option=com_virtuemart&view=category&virtuemart_category_id=7

2nd one - list view

in short desc is

orem ipsum dolor sit amet, " <br>consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim...

(quotes) really don't see why yours should be different..

but are you happy using two single quotes?
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4130

I guess we can train our admins to use two '. :)

So forget the "quote" problem... :)

But the fact remains, we need to use a <br> in order for the lines to break in category view.

Did you test this: (s_desc form field)
This is to be on the first line.
And this it to be on the second line, as a new line.

turns to this: (category view)
This is to be on the first line. And this it to be on the second line, as a new line.

And then using <br>: (s_desc form field)
This is to be on the first line. <br>
And this it to be on the second line, as a new line.

turns to this: (category view)
This is to be on the first line. 
And this it to be on the second line, as a new line.

All I'm saying is that it would be nice to get a line break without having to write <br>.

:)
Last Edit: 9 years 7 months ago by Christin Larsen.
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4133

Yes of course - that is normal in any VM non-editor textarea
It will be stored as html safe i.e all line breaks etc \n\r etc are stripped
In the database will be just a long text string - it's designed this way - if you want otherwise you will need to hack the store process or as you suggested - install the WYSIWYG editor in that field

Cheers
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4135

Yes, I think that's the only way to solve this, since it now stores in the database as on long text string.

Just one thing:
Do you think it as easy as to chang it like this? Or does it take a lot more adjustments?
<textarea class="inputbox" name="product_s_desc" id="product_s_desc" cols="65" rows="3" >
 <?php echo $this->product->product_s_desc; ?></textarea>
 
to
 
<?php echo $this->editor->display('product_s_desc', $this->product->product_s_desc, '100%;', '250', '75', '20', array('pagebreak', 'readmore') ) ; ?>

I know this isn't really your job to answer, but since we're on a roll here, I thought I'd try asking anyway.. ;)
Last Edit: 9 years 7 months ago by Christin Larsen.
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4137

Yes - should work - if thats the editor code for VM2..
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4139

Well, it is the editor code for the long description field...

I'll check to see what the VM forum guys says... :)

But thanks again for your excellent info and help.. :)
The topic has been locked.

Using " (quote) in short description 9 years 7 months ago #4150

No prob -

topic closed
The topic has been locked.
Time to create page: 0.251 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