Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Tips, Tricks & Tutorials
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 20th, 2011, 10:54 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default Display coupons on a product details page from same merchant as the product

Here's how you can display a list of of coupons from the same merchant as a product on the product details page. This will require that coupons exist for that merchant in your store, of course.

The easiest way is to add your coupons to 1 category. There are other ways you could do this but I'll just cover the simplest method here.
  1. Create a new category and name it "Coupons".
  2. Add your coupons to that category.
  3. Create a new Custom View by going to VIEWS > CUSTOM VIEWS > Add a new view
  4. Name the view "coupons_from_single_merchant".
  5. Check the "Don't use layout for this view" checkbox. Your view's properties should look like this:
  6. Add a Product List module to the view and configure the Product List module like this:

    or using the following HTML code:
    HTML Code:
    <h2>Coupons</h2>
    
    [product.each]
      <p>
        <a href="[product.link]"><strong>[product.name]</strong></a>
        from <span style="color:#999;font-size:85%;font-style:italic;">[product.merchant]</span><br />
        [coupon.description]<br />
        <small>
          <strong>Code:</strong> [coupon.code]<br />
          <strong>Restrictions:</strong> [coupon.restrictions]<br />
          <strong>Begin Date:</strong> [coupon.begin]<br />
          <strong>End Date:</strong> [coupon.end]<br />
        </small>
      </p>
    [product.end]
  7. You can also limit the number of coupons to be displayed by modifying the modules settings. I'm limiting it to 3.
  8. Go to the VIEWS > PRODUCT DETAIL > Default view.
  9. Add a new Text module to your view.
  10. Paste the following text into the Text module's template area:
    Code:
    [DFR:coupons_from_single_merchant?c=coupons&amp;merchant=<?php echo $product->merchant; ?>]
    That basically says, "get the coupon template and display coupons from the category "Coupons" and only from the same merchant as this product".
  11. Save the module.
  12. Log into your blog's admin area and go to WordPress Admin Area > Tools > Datafeedr and click the [Update Products and Settings] button.
  13. Now navigate to a product which you know also has a coupon from the same merchant. Here's how my display looks when viewing a product from 123Refills.:

Enjoy,

Eric
  #2  
Old January 21st, 2011, 09:53 AM
cashnow cashnow is offline
 
Join Date: Sep 2009
Posts: 362
Default

Thank you Eric for providing the tutorial.

I have a silly question: How do I add coupons? I created the category but when I search 'coupons' only a few coupons (unrelated to my niche) come up. Is there a way to manually add coupons?

Is there another feed especially for coupons? I know there are sites that work exclusively with coupons. Where do they get those feeds?
  #3  
Old January 21st, 2011, 09:57 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

We have coupon feeds from merchants from Shareasale, Pepperjam and Affiliate window. They have separate feeds for their coupons so you will need to add those merchants who provide coupons related to your niche. You can do that on the "Your Merchants" page but don't forget to also add them to your specific store, too.
  #4  
Old February 25th, 2011, 02:04 PM
dcutri dcutri is offline
 
Join Date: Nov 2010
Posts: 75
Default

Sorry, I don't know how to delete a post. I decided to try it on my own before posting. I came up with the idea to use two product lists on the same search results page--one showing non-coupon products from a specific merchant and another one below it which is only products tagged "coupon". That should work right? that's what I'm trying to do.
  #5  
Old February 25th, 2011, 02:07 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

It should...
  #6  
Old April 24th, 2011, 08:21 PM
onlineshopper onlineshopper is offline
 
Join Date: Mar 2011
Posts: 13
Default

Hi Eric, I've added the “coupons” category and followed all the above instructions, but the merchant coupon is not showing. If you like to check, “Football fanatics” is one of the merchants offering coupons, but its not showing them. Could you please help me figure out what I’ve done wrong? My store id is 31337. Thanks!
  #7  
Old April 24th, 2011, 09:11 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

This is because you have input a slug value for your category.

\

That slug field should be left blank or set to "coupons".

Eric
  #8  
Old April 25th, 2011, 11:36 AM
onlineshopper onlineshopper is offline
 
Join Date: Mar 2011
Posts: 13
Default

Thank you so much Eric for the quick reply! It worked:-)
  #9  
Old May 6th, 2011, 04:54 PM
amindana amindana is offline
 
Join Date: Apr 2011
Posts: 30
Default Error on Page

Hi Eric,

I followed your instructions but had the following error on the product list page

HTML Code:
Warning: Invalid argument supplied for foreach() in /home/thecatal/public_html/argos/wp-content/plugins/datafeedr/datafeedr.php(2203) : eval()'d code on line 3
Are you able to advice please
  #10  
Old May 6th, 2011, 06:37 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

You added the code to a Text module but you need to use a Product List module instead.

Eric
  #11  
Old May 6th, 2011, 07:10 PM
amindana amindana is offline
 
Join Date: Apr 2011
Posts: 30
Default Error on Page

You are a STAR Eric...

That fixed it, sorry I should have paid more attention but as a newbie to the system you'll expect this
  #12  
Old June 3rd, 2011, 02:46 PM
mviadam mviadam is offline
 
Join Date: Apr 2011
Posts: 20
Default

Is there not a feed from merchants that is a sort of items on sale feed? I'd love to be able to have a sales deals page on my site that just fed in different sales for the merchants. Is this possible?
  #13  
Old June 3rd, 2011, 04:31 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Yes, it comes as a default page in your store. If you have products with sales prices in your store, they will appear either here:

yoursite.com/store/sale-items

or here:

yoursite.com/sale-items

Eric
  #14  
Old June 13th, 2011, 02:52 PM
mviadam mviadam is offline
 
Join Date: Apr 2011
Posts: 20
Default

So could I follow these same steps to create a 'sales items by merchant' view?
  #15  
Old June 13th, 2011, 03:15 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Sure.
  #16  
Old June 14th, 2011, 07:12 PM
pennymoonchild pennymoonchild is offline
 
Join Date: Jun 2011
Posts: 6
Default

Is it possible to embed a merchant's products and coupon codes within a post or page directly in wordpress?
  #17  
Old June 14th, 2011, 07:16 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Yes, check out the DFR shortcode and filters here:
http://www.datafeedr.com/docs/item/185
http://www.datafeedr.com/docs/item/154
http://www.datafeedr.com/docs/item/167
  #18  
Old June 14th, 2011, 09:08 PM
pennymoonchild pennymoonchild is offline
 
Join Date: Jun 2011
Posts: 6
Default

I am totally lost. I cannot figure it out. If it is not too much trouble can you please provide me with an example? I'd really appreciate it. I have no idea what codes to put where. My output keep giving me Invalid argument errors.
  #19  
Old June 14th, 2011, 09:34 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Can you tell me what you have so far? What custom view(s) have you created and what shortcode are you embedding in your posts?

You want to make sure you have a category that contains all of the coupons. Let's say that category is called 'coupons'.

Then you want to create a new custom view that will display the coupons. Be sure to add a product list module to that view. Let's call that view 'merchant_coupons'.

Then you will have a short code that you will embed in a post like this:
[DFR:merchant_coupons?c=coupons&merchant=MyMerchant sName.com]
  #20  
Old June 15th, 2011, 04:20 PM
pennymoonchild pennymoonchild is offline
 
Join Date: Jun 2011
Posts: 6
Smile

Quote:
Originally Posted by Eric View Post
Then you will have a short code that you will embed in a post like this:
[DFR:merchant_coupons?c=coupons&merchant=MyMerchant sName.com]
Thanks so much Eric! This is the code I was looking for. Much appreciated!
 


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 06:09 AM.


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