Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 25th, 2012, 08:31 AM
wepisto wepisto is offline
 
Join Date: Jul 2012
Posts: 44
Default Widgets Products HTML + cut 20 words

Hi

I want on my Widgets Products html on yes and max words 20.
I try many things like this: [product.description cut='20 words' html='yes']
But it don't work together

Thanks
__________________
  #2  
Old October 25th, 2012, 09:02 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I went to your site and it seems to be working fine for me. Each product in your sidebar has 20 words for the description.

Eric
  #3  
Old October 25th, 2012, 09:42 AM
wepisto wepisto is offline
 
Join Date: Jul 2012
Posts: 44
Default

Hi Eric,

The problem is in the html I want the html='yes' and max 20 words.
__________________
  #4  
Old October 25th, 2012, 09:56 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

This works for me: [product.description html='yes' cut='10 words']

But if you have a lot of HTML in your description, you might have to compensate for that code as that also gets counted in the word count.

Eric
  #5  
Old October 25th, 2012, 10:24 AM
wepisto wepisto is offline
 
Join Date: Jul 2012
Posts: 44
Default

Hi,

I have try this again and it don't work. cut='10 words' works fine, but html='yes' or html='1' don't work.

As you can see on the widget the first word is: rating=4] as you click on 'more details' thare you can see "rating stars". On the product page Related Products the rating stars work fine.

I hope you can help me
__________________

Last edited by wepisto : October 25th, 2012 at 10:25 AM.
  #6  
Old October 25th, 2012, 01:03 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

The problem is that the shortcode you are using is being rendered after Datafeedr filters the description.

I don't think what you are going for is possible.

Eric
  #7  
Old October 25th, 2012, 01:06 PM
wepisto wepisto is offline
 
Join Date: Jul 2012
Posts: 44
Default

Hi Eric

The same problem is also on the "Category page Product list" as i use this: [product.description html='yes' cut='30 words'] This code works only on the 30 words but not on the HTML I hope that you can help me with some php or CSS to fix the HTML problem.

Thanks

(Maybe works the HTML code correct but the first character i use don't work)
The HTML I use is: [rating=*]
I see on all the products missing the first [
__________________
  #8  
Old October 25th, 2012, 01:24 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Try this instead: <div class="desc"><?php echo substr($product->description, 0, 65); ?></div>

Eric
  #9  
Old October 25th, 2012, 02:17 PM
wepisto wepisto is offline
 
Join Date: Jul 2012
Posts: 44
Default

Hi Eric,

Thanks for the code i don't no what it exactly says but it is better now. I have put some ... after the code the description end is in the middle of the words on the category page.

Product list:
<p class="desc"><?php echo substr($product->description, 0, 250); ?>...</p>

The [ are back and I think that the problem the widget himself is i have remove the text from the widget because I kept seeing [rating=*]

If you have some ideas for complete words let me know
__________________
  #10  
Old October 25th, 2012, 02:23 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by wepisto View Post
If you have some ideas for complete words let me know
You could try replacing the substr function with a function like this: http://snipplr.com/view/12987/
  #11  
Old October 25th, 2012, 03:06 PM
wepisto wepisto is offline
 
Join Date: Jul 2012
Posts: 44
Default

Quote:
Originally Posted by Eric View Post
You could try replacing the substr function with a function like this: http://snipplr.com/view/12987/
Yes thanks Eric this works great!
__________________
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tag cloud words mramis Questions 1 September 7th, 2012 01:33 PM
Substituting words in product descriptions ayorofrance Questions 8 May 4th, 2011 08:34 AM


All times are GMT -5. The time now is 01:07 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.