The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 05-18-2016, 08:09 PM
Chelsy Henry's Avatar
Chelsy Henry is offline
 
Join Date: Jan 2014
Posts: 4
Exclamation

Remove giant line spacing between sentences in product descriptions


Can anyone help me with the correct css to change the huge spacing in my product descriptions? Here is one of them: http://www.rmsmachinery.com/browse/#...egory=10185403

I want all products descriptions to be in identical format.

Thank you!
  #2  
Old 05-20-2016, 12:06 PM
Tara K's Avatar
Tara K Tara K is offline
 
Join Date: Apr 2016
Posts: 43
Default

Quote:
Originally Posted by Chelsy Henry View Post
Can anyone help me with the correct css to change the huge spacing in my product descriptions? Here is one of them: http://www.rmsmachinery.com/browse/#...egory=10185403

I want all products descriptions to be in identical format.

Thank you!
Hello Chelsy,

There are excessive paragraphs added to product descriptions and they cause extra empty spaces. Chelsy, please describe how you create your product descriptions. Do you use any text editor where you input your text before adding it to your Ecwid store? If so, which text editor you use?

To fix the issue please try the following:
  1. Cut product description from your store.
  2. Paste it into any simple editor (like Sublime or Notepad).
  3. Copy the text from the editor.
  4. Paste the text back to your product description in Ecwid. To do this, please use HTML editor:
  5. Format the text and save the changes.

This should help.
  #3  
Old 05-20-2016, 05:40 PM
Chelsy Henry's Avatar
Chelsy Henry Chelsy Henry is offline
 
Join Date: Jan 2014
Posts: 4
Default

Hey Tara,

Thank you for the reply! Unfortunately that is way to time consuming for my 1,000 products...
Not all of the descriptions have a problem, it's only ever since you guys had updated the product description area. I need a CSS code that changes them all or an idea that is more time effective.

Thank you!
  #4  
Old 05-23-2016, 02:56 PM
Tara K's Avatar
Tara K Tara K is offline
 
Join Date: Apr 2016
Posts: 43
Default

Quote:
Originally Posted by Chelsy Henry View Post
Hey Tara,

Thank you for the reply! Unfortunately that is way to time consuming for my 1,000 products...
Not all of the descriptions have a problem, it's only ever since you guys had updated the product description area. I need a CSS code that changes them all or an idea that is more time effective.

Thank you!
Hello Chelsy,

I understand. Chelsy, will you please tell me how you add your product descriptions? What text editor do you use? Or perhaps you copy and paste them from a site? We’d like to investigate the issue on our side.
By the way, if you want to edit products/orders/customers in bulk you can use the default Import-Export feature.

For now, I’ll give you some hints to work this issue around.

The thing is some text editors add extra invisible symbols to linebreaks. Ecwid reads the text you input in product description (after it had been edited in the text editor) and considers that it should be “enveloped” into paragraphs. Thus empty spaces appear in product descriptions.

F.ex., your text in a product description:

1 - USED 6’ X 12” DURMA HD-L 4020 PF7 5000 WATT LASER CUTTER
REF. NO. C-4283

has three empty paragraphs which were added after Ecwid detected invisible symbols and transformed them into empty lines:


So your text looks like this:



That’s why I advised you to use simple text editors (Sublime, Notepad or alike) instead of the one you use now.

To remove empty spaces in your product descriptions in bulk, you should add this javascript code to the page where your Ecwid store is installed:

Code:
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
Ecwid.OnPageLoaded.add(function(page) {
if ("PRODUCT" == page.type) {
$('.ecwid-productBrowser-details-descr p').each(function(){
    if (!$(this).text().trim().length) {
        $(this).hide();
    }
});
};
});
After this your product description will look like this:


If you want to increase the space between the lines (by 5 px, f.ex.), then you should add the below CSS code to your Ecwid Control Panel -> Settings -> Design page (to the CSS theme which is currently active in your store):

Code:
.ecwid-productBrowser-details-descr p {
padding: 5px !important;
}
Thus your product descriptions will look this way:

  #5  
Old 05-23-2016, 05:42 PM
Chelsy Henry's Avatar
Chelsy Henry Chelsy Henry is offline
 
Join Date: Jan 2014
Posts: 4
Default

Thank you for this.

Half of our products were typed in an old Microsoft Word, we then copy and pasted them into Ecwid. I understand the extra spacing from that. The new Word we currently use does not add the extra spacing.

I tried to put the script:
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
Ecwid.OnPageLoaded.add(function(page) {
if ("PRODUCT" == page.type) {
$('.ecwid-productBrowser-details-descr p').each(function(){
if (!$(this).text().trim().length) {
$(this).hide();
}
});
};
});

into the page of wordpress where Ecwid is but that did not work.
I then tried to put it in the header.php file (but only at the end of it) because I'm unsure where else it would go.
That did not work either..

What am I doing wrong with the script?

Thank you again!
  #6  
Old 05-24-2016, 12:06 PM
Tara K's Avatar
Tara K Tara K is offline
 
Join Date: Apr 2016
Posts: 43
Default

Quote:
Originally Posted by Chelsy Henry View Post
Thank you for this.

Half of our products were typed in an old Microsoft Word, we then copy and pasted them into Ecwid. I understand the extra spacing from that. The new Word we currently use does not add the extra spacing.

I tried to put the script:
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
Ecwid.OnPageLoaded.add(function(page) {
if ("PRODUCT" == page.type) {
$('.ecwid-productBrowser-details-descr p').each(function(){
if (!$(this).text().trim().length) {
$(this).hide();
}
});
};
});

into the page of wordpress where Ecwid is but that did not work.
I then tried to put it in the header.php file (but only at the end of it) because I'm unsure where else it would go.
That did not work either..

What am I doing wrong with the script?

Thank you again!
Hello Chelsy,

Thank you for the clarification. Sorry, I provided you the code with missing <script> tags. Please accept my apologies for this. Here is the corrected code:

Code:
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
Ecwid.OnPageLoaded.add(function(page) {
if ("PRODUCT" == page.type) {
$('.ecwid-productBrowser-details-descr p').each(function(){
if (!$(this).text().trim().length) {
$(this).hide();
}
});
};
});
</script>
Try it please and let me know the results. You shouldn’t put it in the header.php file. You should put it in the end of the site page where your Ecwid is installed.
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Tags
css, line, product description, spacing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:05 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.