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 29th, 2013, 04:29 AM
raj2006 raj2006 is offline
 
Join Date: Oct 2008
Location: New Delhi, India
Posts: 147
Default Random product inside blog post

My URL is:

http://aprons.buytopproducts.org/ins...r-winter-wear/

I would like to incorporate one related product in each blog post on the top left of the content (float left).

How do I implement this?

Thanks

ps: I am not able to search for earlier posts in your forum for this topic as the search function is not working. Please refer to my other forum post today on this issue.
__________________
Making Sizeable Income From Passive, Hands-Off Affiliate Marketing Is A Reality!
Learn These Guaranteed Techniques from Confessions of a Lazy Super Affiliate eBook.
  #2  
Old October 29th, 2013, 08:57 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Here's how to do that:
http://www.datafeedr.com/docs/item/184
http://www.datafeedr.com/videos/?vid...rc=yt#videotop


Eric
  #3  
Old October 29th, 2013, 09:08 AM
raj2006 raj2006 is offline
 
Join Date: Oct 2008
Location: New Delhi, India
Posts: 147
Default

Hi Eric,

Thanks for your response.

I saw your first link

Instead of embedding a specific product, if I wish to display a random product from a store category, how to implement it?
__________________
Making Sizeable Income From Passive, Hands-Off Affiliate Marketing Is A Reality!
Learn These Guaranteed Techniques from Confessions of a Lazy Super Affiliate eBook.
  #4  
Old October 29th, 2013, 09:26 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

In that case you'll need to replace the Product Details module with a Product List module, change the settings of the Product List module to sort products Randomly and then pass a category ID in the shortcode like this:

[DFR:Embedded Product?c=123456] (where 123456 is the category you want to choose a product from)

Eric
  #5  
Old October 29th, 2013, 01:24 PM
raj2006 raj2006 is offline
 
Join Date: Oct 2008
Location: New Delhi, India
Posts: 147
Default

Hi Eric,

Probably I am not doing something right.

I have created a custom view, added product list module, used a 3 column template, changed sorting to random, Updated DFR in WP, added shortcode in above mentioned post.

But, product not getting displayed.
__________________
Making Sizeable Income From Passive, Hands-Off Affiliate Marketing Is A Reality!
Learn These Guaranteed Techniques from Confessions of a Lazy Super Affiliate eBook.
  #6  
Old October 29th, 2013, 01:25 PM
raj2006 raj2006 is offline
 
Join Date: Oct 2008
Location: New Delhi, India
Posts: 147
Default

Shop is 42595 and I added the following shortcode to my blog post

[DFR:Embedded Product?c=1202901]

Again, the blog post is:

http://aprons.buytopproducts.org/ins...r-winter-wear/
__________________
Making Sizeable Income From Passive, Hands-Off Affiliate Marketing Is A Reality!
Learn These Guaranteed Techniques from Confessions of a Lazy Super Affiliate eBook.

Last edited by raj2006 : October 29th, 2013 at 01:26 PM.
  #7  
Old October 29th, 2013, 01:51 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Your view is named "Random Product in Post" so your shortcode will be:

[DFR:Random Product in Post?c=1202901]

Eric
  #8  
Old October 30th, 2013, 12:19 AM
raj2006 raj2006 is offline
 
Join Date: Oct 2008
Location: New Delhi, India
Posts: 147
Default

Hi Eric,

Thanks.

How silly of me I didn't notice the shortcode.

Now, the products are displaying. But, unfortunately, they are showing one product below the other and not showing the correct 3-colum layout as on the home page: http://aprons.buytopproducts.org/

I am using the 3-column layout from Template 1 under Product List with the code as below. What do you think should be corrected in this code to get the 3-column layout?

Code:
<div class="pl">
  [product.each]
  <div class="t1 col3">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dfred dfmedium" rel="nofollow">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div>
__________________
Making Sizeable Income From Passive, Hands-Off Affiliate Marketing Is A Reality!
Learn These Guaranteed Techniques from Confessions of a Lazy Super Affiliate eBook.
  #9  
Old October 30th, 2013, 04:05 AM
raj2006 raj2006 is offline
 
Join Date: Oct 2008
Location: New Delhi, India
Posts: 147
Default

Apart from the above issue of proper display of the 3-column layout, I just need one more help.

Instead of inserting the shortcode in each blog post, I have created a php code below to automate the process. Instead of the shortcode, I have tested it with the echo statement and the php is working per se.

But, the shortcode inside the php is breaking the code. How to correct it?

Code:
<?php
$categories = get_the_category();
foreach($categories as $category) { $cat_name = $category->slug; }

switch ($cat_name)
{
	case "adult-bibs":
		[DFR:Random Product in Post?c=1222595];
		break;
	case "gloves":
		[DFR:Random Product in Post?c=1202902];
		break;
	case "kids-aprons":
		[DFR:Random Product in Post?c=1202900];
		break;		
	case "kids-bibs":
		[DFR:Random Product in Post?c=1202901];
		break;			
	case "mens-aprons":
		[DFR:Random Product in Post?c=1202899];
		break;			
	case "womens-aprons":
		[DFR:Random Product in Post?c=1202898];
		break;
}			
?>
__________________
Making Sizeable Income From Passive, Hands-Off Affiliate Marketing Is A Reality!
Learn These Guaranteed Techniques from Confessions of a Lazy Super Affiliate eBook.
  #10  
Old October 30th, 2013, 08:17 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi
Quote:
Originally Posted by raj2006 View Post
I am using the 3-column layout from Template 1 under Product List with the code as below. What do you think should be corrected in this code to get the 3-column layout?
I'm seeing 3 columns now. I assume you got this fixed...



Quote:
Originally Posted by raj2006 View Post
Apart from the above issue of proper display of the 3-column layout, I just need one more help.

Instead of inserting the shortcode in each blog post, I have created a php code below to automate the process. Instead of the shortcode, I have tested it with the echo statement and the php is working per se.

But, the shortcode inside the php is breaking the code. How to correct it?

Code:
<?php
$categories = get_the_category();
foreach($categories as $category) { $cat_name = $category->slug; }

switch ($cat_name)
{
	case "adult-bibs":
		[DFR:Random Product in Post?c=1222595];
		break;
	case "gloves":
		[DFR:Random Product in Post?c=1202902];
		break;
	case "kids-aprons":
		[DFR:Random Product in Post?c=1202900];
		break;		
	case "kids-bibs":
		[DFR:Random Product in Post?c=1202901];
		break;			
	case "mens-aprons":
		[DFR:Random Product in Post?c=1202899];
		break;			
	case "womens-aprons":
		[DFR:Random Product in Post?c=1202898];
		break;
}			
?>
You need to use the PHP version of the Shortcode. So your code would look like this:

PHP Code:
<?php
$categories 
get_the_category();
foreach(
$categories as $category) { $cat_name $category->slug; }

switch (
$cat_name)
{
    case 
"adult-bibs":
        echo 
datafeedr_tag('Random Product in Post?c=1222595');
        break;
    case 
"gloves":
        echo 
datafeedr_tag('Random Product in Post?c=1202902');
        break;
    case 
"kids-aprons":
        echo 
datafeedr_tag('Random Product in Post?c=1202900');
        break;        
    case 
"kids-bibs":
        echo 
datafeedr_tag('Random Product in Post?c=1202901');
        break;            
    case 
"mens-aprons":
        echo 
datafeedr_tag('Random Product in Post?c=1202899');
        break;            
    case 
"womens-aprons":
        echo 
datafeedr_tag('Random Product in Post?c=1202898');
        break;
}            
?>
You can find out more about Shortcodes here: http://www.datafeedr.com/docs/item/185

Eric
  #11  
Old October 30th, 2013, 08:27 AM
raj2006 raj2006 is offline
 
Join Date: Oct 2008
Location: New Delhi, India
Posts: 147
Default

Hi Eric,

The shortcode problem has been resolved after I incorporated the code correction that you gave. Thanks a lot.

Regarding 3-column layout issue, you referred to the store homepage that is already fine.

But, the issue is on the blog post. At the end of the blog post content, the products are appearing one below the other. Please see the below URL for example:

http://aprons.buytopproducts.org/blog/

Please look at any of the blog posts from the above URL.

Thanks
Raj
__________________
Making Sizeable Income From Passive, Hands-Off Affiliate Marketing Is A Reality!
Learn These Guaranteed Techniques from Confessions of a Lazy Super Affiliate eBook.
  #12  
Old October 30th, 2013, 08:29 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

To fix that, do this:

1. Go here: The Factory > Your Store > VIEWS > CUSTOM VIEWS > Random Product in Post > View menu > View Properties

2. Add the word view to the CSS ID field.

3. Save and update your site.

Eric
  #13  
Old October 30th, 2013, 09:04 AM
raj2006 raj2006 is offline
 
Join Date: Oct 2008
Location: New Delhi, India
Posts: 147
Default

Hi Eric,

Thank you so much.

The issues are resolved and it is working fine now.

Raj
__________________
Making Sizeable Income From Passive, Hands-Off Affiliate Marketing Is A Reality!
Learn These Guaranteed Techniques from Confessions of a Lazy Super Affiliate eBook.
 


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
How to Show the Product Post with Random Price myfa1z Questions 1 October 10th, 2011 07:34 PM
Embed Product Image inside Post patagonia Questions 7 January 31st, 2011 08:11 PM


All times are GMT -5. The time now is 10:26 AM.


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