View Single Post
Old November 20th, 2014, 10:53 PM
stevenlalwani stevenlalwani is offline
Join Date: Nov 2014
Posts: 58
Default Display of coupons from all my selected merchants?

Originally Posted by Eric View Post
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:
        <a href="[]"><strong>[]</strong></a>
        from <span style="color:#999;font-size:85%;font-style:italic;">[product.merchant]</span><br />
        [coupon.description]<br />
          <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 />
  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:
    [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.:



Since I have many merchants in several stores, how do I display all the coupons on my Homepage from all the merchants and arranged by categories and Merchants? Then a visitor can copy and paste the code on the selected product.