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 January 30th, 2011, 12:45 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default Embed Product Image inside Post

Since converting from V1 to V3, now obviously none of the product images inside my posts are working. So I am working on replacing them all.

So we use to do this before, by pushing a little DFR button from inside the Edit Post.

Now I am guessing we need to do this by embedding a custom view?
So I have created a custom view called "Image Inside Post" and put it inside my post like so:
PHP Code:
[DFR:Image Inside Post?p=1503601426736630
That is all fine. However the image is way to big.
I used the same code from the Product Detail view, inside the factory:

PHP Code:
<!-- Single Product -->
<
div class="sp">
  <
div class="lc">
    <
div class="thmb">
      <
a href="[product.url direct='0']" title="[product.name]" target="_blank">
        [
product.image tag='1']
      </
a>
    </
div>
  </
div>
  <
div class="rc">
    <
h2><a href="[product.url direct='0']" title="[product.name]" target="_blank">[product.name]</a></h2>
  </
div>
  <
div class="clearingdiv"> </div>
</
div>
<!-- /
Single Product -->&#8203; 
Minus the price and description.

Hmm, so why is it displaying different? The image output on my product details page is about 200x 200, but on the post it is the full image size I guess.

So I looked at the Default CSS code from the docs and it says the width is 200

PHP Code:
#view .sp .lc .thmb img {max-width:200px; width:expression(this.height < this.width && this.width > 200 ? '200px' :true);} 
So why is the product image in my post much larger?

However... I notice also there is some css code for

PHP Code:
/*******************************
EMBEDDED PRODUCT
*******************************/
.fl floatleftwidth200px; }
.
fr floatrightwidth200px; }
.
embedded .t1 padding0margin0 0 5px 0border0; }
.
embedded .t1 .bdr border1px #B3B3B3 solid; margin: 0 5px 10px 5px; padding: 2px; height: 100%; }
.embedded .t1 .bdr .thmb border0overflowhiddentext-aligncentermargin5px autopadding0; }
.
embedded .t1 .bdr .thmb img border0padding0margin0background-colortransparent; }
.
embedded .t1 .bdr .prc text-aligncentermargin5px 0; }
.
embedded .t1 .bdr h2 margin0padding0overflowhiddentext-aligncenterline-height1.3emheight2.6em; }
.
embedded .t1 .bdr h2 a margin0displayblock; }
.
embedded .t1 .bdr .desc overflowhiddenheight6emline-height1.5emmargin0 5pxpadding0; }
.
embedded .t1 .bdr .btns overflowhiddenmargin0 0 5px 0padding5px 0text-aligncenter; }
.
embedded .t1 .bdr .btns a img border0margin2px 0 0 0padding0background-colortransparent; } 
Which looks like it would be used for embedding a product image inside a post.
Is there a view already made for this, as I can't see it... or is it "coming"?
  #2  
Old January 30th, 2011, 01:31 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

You need to add a Custom CSS ID to your custom view Image Inside Post.

The Factory > Your Store > CUSTOM VIEWS > Image Inside Post > View menu > View Properties > Custom CSS ID. In that field, add the word view.
  #3  
Old January 31st, 2011, 01:53 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

Righto, so I did this and it worked. Glad you know how it works, because that would have been the last place I would have looked.

1. Will you be creating a view for these embedded products, since I see the CSS code is already there for it... or is it already there, and I just haven't seen it?

2. Also, using the View I created for Image Inside Post, after much playing around, I got the product title to move under the image. But how do I get the text to wrap around the image?
This is an image inside a post: http://wallstickers-decals.com/attra...-in-your-rooms
And also for here, on the product detail page:
http://wallstickers-decals.com/store...57401302671680
  #4  
Old January 31st, 2011, 02:44 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

I've created a new Docs page regarding embedding a product in a post.
http://www.datafeedr.com/docs/item/184

Eric
  #5  
Old January 31st, 2011, 06:32 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

Thanks Eric,

The code on the docs page, is a bit messed up though with some datafeedr.com urls in it.
But I got it to work fine, as you described.

Can you explain more though what the setting "Don't use layout for this view" actually does, and how clicking that box made the text wrap around the image??
  #6  
Old January 31st, 2011, 07:09 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

I've fixed the code on the docs page. The Docs software likes to insert URLs where they are not supposed to be.

The 'don't use layout' removes all of the html code that creates the layout code. The layout code is responsible for handling rows and columns in the layout. When turned off, none of the html code gets rendered, except for what appears in the module itself.

Eric
  #7  
Old January 31st, 2011, 07:58 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

I'll just pretend I understand what you are talking about.

So I tried the same trick with the Product Details view and it didn't work. So is there another trick I need to use to enable the text description on the Product Detail, to wrap around the image?
  #8  
Old January 31st, 2011, 08:11 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by patagonia View Post
I'll just pretend I understand what you are talking about.
Layout is what creates the rows and columns you find when you are looking at a View. The layout in the view is covered thoroughly here: http://www.datafeedr.com/videos/?vid...ayout#videotop If you remove the layout code (ie. check the "Don't use layout for this view" box), then the content of a view will not be formatted into neat and tidy rows and columns. This is useful when you are embedding content into an already existing layout, like a post.

Quote:
Originally Posted by patagonia View Post
So I tried the same trick with the Product Details view and it didn't work. So is there another trick I need to use to enable the text description on the Product Detail, to wrap around the image?
That's because the Product Details view is an entirely different beast which would warrant its own thread and discussion.
 


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


All times are GMT -5. The time now is 03:12 PM.


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