Blog

Periodic postings from the Datafeedr team.

Featured image for Blog blog post

How to Geo-target Datafeedr Content With GeoTargetingWP?

We regularly receive support tickets from Datafeedr customers asking whether it’s possible or not to show products or comparison sets based on a visitor’s geographic location. Here are just a few of the questions we recently received… Datafeedr has no built-in geo-targeting functionality. That doesn’t mean you can’t geo-target Datafeedr content on your site! Meet GeoTargetingWP! After playing around with this plugin I'm confident enough to say that this is one of the best geo-targeting WordPress plugins on the market today. This plugin offers a lot of possibilities if you wish to show or hide products based on a visitor’s geographic location.How Does GeoTargetingWP Work?GeoTargetingWP is a premium WordPress plugin which helps you geo-target your content via different methods. The plugin is using a geolocation database that – according to the site – accurately targets 99.9% of your site visitors.When a visitor lands on a page on your site which is using geo-targeting functionality, the plugin will send the user’s IP address to the database and then gets returned the visitor’s geographical info. Based on that info the visitor is served the default content or specific content tailored to the visitor’s country, state or even city.One call to GeoTargetingWP’s database counts as 1 API request. Because the location info is saved during the session any additional page views from the same visitor won’t generate additional API requests to the server.How Much Does GeoTargetingWP Cost?GeoTargetingWP is a subscription based service. The pricing model is based on the number of API requests your site makes to the geolocation database per month. The more pages on your site use geo-targeting functionality and the more traffic your site gets, the more API requests you’ll need.At the time of this writing there are 5 pricing plans varying from $9 per month (allowing your site to call the geolocation database 10,000 times) up to $199 per month (allowing your site to make up to 2,000,000 API requests). The good news is that each plan can be used on unlimited sites so with one license you can use the plugin on as many sites as you wish. Each plan comes with a free 14-day trial (no credit card needed).Do I need GeoTargetingWP?That’s up to you, of course. Once you have an established site, your website will get traffic from all around the world. If you could show your visitors products from their local retailers in the local currency, don’t you think this would drastically improve user experience and your site’s conversion rate? You bet, it will!GeoTargetingWP can geo-target almost any part of your website like entire posts and pages or parts of it, custom post types like WooCommerce products, sidebar widgets, entire menus or individual menu items, banners and links,… The possibilities are really endless. Below I've listed some use cases to show you how powerful the plugin really is.TEST: Geo-Targeting Datafeedr Comparison Sets in Blog PostsSo let’s test and see if it’s possible to display a different comparison set in a single blog post based on the visitor’s location. I wish to geo-target visitors from USA (USD), UK (GBP) and NL (EUR) and show visitors from those countries a comparison set with local retailers. The product I'm using in this test is the Braun 7898CC shaver. Via the Datafeedr scratchpad I’m researching which USA, UK and NL merchants sell the Braun 7898CC shaver. Then I select my favorite merchants in the WordPress admin > Datafeedr API > Merchants area. In the blog post I add the Datafeedr Comparison Set shortcodes for each location by using the currency filter. See the code in the screenshot below. Without geo-targeting functionality the post would look like in the screenshot below – 3 comparison sets in a row with the first comparison set targeting USA visitors, the second comparison set targeting UK visitors and the last comparison set targeting NL visitors. Our goal is to just display one single comparison set based on the visitor’s location. UK visitors should only see the GBP comparison set, NL visitors only the EUR comparison set and USA vistors only the USD comparison set. For all other countries I wish to display the USD comparison set.Applying geo-targeting in this case is easy by using GeoTargetingWP's shortcodes. To add geo-targeting to the comparison sets I just surround the Datafeedr Comparison Set shortcodes with the GeoTargetingWP shortcodes like in the screenshot below.Because the USA comparison set is the default comparison set it will be always displayed except for UK and NL visitors. That's why I’m excluding the countries UK and NL in the shortcode.To display the GBP comparison set only to UK visitors I’m setting the "country" attribute = GB and to display the EUR comparison set only to NL visitors I’m setting the "country" attribute = NL. But how to test this? To test whether the right comparison set is displayed to the right visitor I’m using one of my favorite VPN solutions – NordVPN. This solution allows you to hide and change your IP address by redirecting your internet connection through one of NordVPN’s servers in any of the 50+ supported countries (at the time of this writing).So to simulate I’m a visitor from the UK I select United Kingdom in the NordVPN desktop app. Once connected to a NordVPN server in the UK I’m now able to browse with the server’s UK IP address. When I reload the page with the 3 comparison sets I’m now only seeing the GBP comparison set! Now I’m doing the same to test the comparison set I’ve built for NL visitors. In the NordVPN app I disconnect from the server in the UK and connect to a NordVPN server in NL. When I reload the page with the 3 comparison sets I’m now only seeing the EUR comparison set! As final test I disconnect from the server in NL and connect to a NordVPN server in USA. When I reload the page with the 3 comparison sets I’m now only seeing the USD comparison set! When disconnecting fom NordVPN entirely I’m still seeing the USD comparison set. As I live in Belgium and I didn’t build a specific comparison set for my country I’m getting the default comparison set displayed.This was just a simple test with only 3 countries. You can not only geo-target countries but also states, cities and zip codes. You can also group countries, cities, zip codes and states into “regions”. Then target those regions with specific content. The possibilities are endless.TEST: Geo-Targeting Products in WooCommerce Store CategoriesNow let’s do another test and see if it’s possible to display different products in a store category based on the visitor’s location. There are a few options here.OPTION 1: Geo-target on product levelWhen the number of products in your store is limited, you can geo-target each single product by specifying when it should show or hide. Let’s illustrate with an example. I’ve addded the Braun 7898CC from a UK, US, DE, NL and SE retailer into a single store category. As you can see in below screenshot... without geo-targeting it doesn’t look good with the same product appearing multiple times and in different currencies in the same category. To geo-target on product level just go to the WordPress admin > Products area. Then edit the product you wish to geo-target and set up the appropriate settings in the “GeoTargeting page settings”. In the screenshot below you see the settings for the GBP product (merchant VERY). The product will only be displayed for visitors from the United Kingdom and Northern Ireland. Then set up similar settings for the other products in the category. To test I’m using my favorite VPN solution again – NordVPN. Once connected to a NordVPN server in the UK I’m able to browse with the server’s UK IP address. When reloading my category page I now see only the product from VERY! The other 4 products are hidden. OPTION 2: Geo-target on store category levelInstead of geo-targeting each product individually (as in option 1) you can also choose to set up categories per country and geo-target categories by specifying when they should show or hide.Let’s illustrate this with a simple example. In the WordPress admin > Products > Categories area I create 3 “Braun Series 7” store categories – one for USA, one for UK and one for NL. Products from USA merchants go into the first category, Products from UK merchants go into the second category and products from NL merchants go into the third category. To keep it simple I add 1 product in each single category. As you can see in below screenshot... without geo-targeting all 3 products appear on the shop page and it doesn’t look good with the same categories appearing multiple times in the sidebar. So let’s apply geo-targeting. UK visitors should only see the UK category, NL visitors only the NL category and USA vistors only the USA category. For all other countries I display the USD category.To geo-target on category level just go back to the WordPress admin > Products > Categories area. Then edit each category you wish to geo-target and set up the appropriate settings. In the screenshot below you see the setting for the UK category. I do the same for the NL category by adding country code NL to the "Include Countries" field. As I’ve chosen to display always the USA category except for UK and NL visitors I’m using the "Exclude Countries" field and exclude the countries GB and NL. To test whether the right store category is displayed I’m using NordVPN again. Let’s test this for NL. Once connected to a server in the Netherlands I’m reloading the shop page and now I’m seeing only the product from bol.com. ConclusionThese were just a couple of simple tests to show you how simple it is to serve different products based on your visitor’s location. After playing around with the plugin for a couple of weeks now I’ve become a huge fan and I can safely say this is the best geo-targeting plugin I’ve used so far.If you want to serve more relevant content based on your visitor’s location, keep the wrong audience away, improve your site’s performance and conversion rate, then I highly recommend to look into GeoTargetingWP. Sign up for the free 14-day trial (no credit card needed) here.

Featured image for Blog blog post

4 Ways to Monetize Your Website With Datafeedr

Since 2008, Datafeedr has helped thousands of affiliate marketers worldwide monetize their websites. Having the biggest affiliate product database worldwide and a powerful search engine to search across different affiliate networks and excellent tech support Datafeedr has become the number 1 affiliate datafeed integration service for affiliates worldwide. If you’re new to Datafeedr here’s a quick overview how you can monetize your website with affiliate content.1: Create a WooCommerce Affiliate StoreThe Datafeedr WooCommerce Importer Plugin allows you to search, select and import affiliate products from Datafeedr’s huge database (at the time of this writing 600+ million products) into your WordPress website and display those products using one of the most popular eCommerce platforms, WooCommerce. To get an idea about the store building process just watch this video in which Eric shows you how easy it is to import affiliate products into your WordPress WooCommerce store. Each product has its own landing page. The Buy Now button (affiliate link) redirects to the corresponding product page on the merchant’s site. Want to bypass the single product pages on your website entirely? No problem. It’s possible to make all of the product links on your product category pages go directly to the merchant’s website. 2: Supplement Your WooCommerce Product Detail Pages by Adding Price Comparison SetsBy default, a WooCommerce theme uses a generic page to show basic product information like product name, description, image and price for example. To make your product pages more unique you can use the Datafeedr Comparison Sets Plugin to supplement the product information with a price comparison set. When the WooCommerce Integration option in the plugin is activated, a price comparison set will be automatically created for each product in your WooCommerce store – ie. if any product matches are found in the product feeds from your selected merchants. 3: Embed Price Comparison Sets into Blog Posts and Pages or any Other Area Where WordPress Shortcodes are AllowedIf you prefer not to create an affiliate store… no worries… you can still use Datafeedr to monetize your site content. Datafeedr’s Comparison Sets Plugin also allows you to embed Price Comparison Sets in your blog posts, pages or in any other area where WordPress shortcodes are allowed. Ideal for affiliates with product review websites.4: Create Your Own Custom Solution by Using the Datafeedr APIAre you a developer and want to create your own custom solution? The Datafeedr API provides a powerful interface that enables you to programmatically find and filter product and coupon data from the affiliate networks and merchants Datafeedr supports giving you the keys to build something awesome! The API does not handle anything other than allowing you to query Datafeedr’s huge product database and returning products. The rest is up to you or your developer(s) :). Click here to access the API documentation.

Featured image for Blog blog post

Are Your Product Pages Missing the Mark? Here's How You Can Fix It

All too many affiliate product pages are thin in content and boring. Learn how to up your product description (re)writing game and avoid common mistakes with this guide.Have you worked hard building your affiliate store but still aren’t seeing the conversion rates you had hoped for? It’s possible that your product pages are completely missing the mark.If you’re using a merchant’s product feed to create your product pages this is more likely to be true. Here are a couple of issues you will face when importing the manufacturers’ product descriptions straight into your website.ISSUE 1: THIN CONTENTThe product descriptions merchants provide in their datafeeds are most of the time only a few dozen words or even worse… sometimes a merchant does not provide product descriptions at all. As a result, you end up with product pages thin in content.Here’s an example of a thin product page only listing a product image, the product name and description, the price, buy now link and links to the other product categories on the site. As you can see in the image below (click on it to enlarge the image) the product information comes straight from the merchant’s datafeed. The description hardly counts 36 words! With so less information potential customers will have to know exactly what your product is all about from the start or guess based on the picture. If you’re going to sell your visitors on the products you’re promoting, try to provide plenty of details. They should never have questions about what a product is or how it works. The more information you can provide, the more confident they’ll feel and the less likely it will be they will search for more information elsewhere.If you explain what the product is, how the product works, what makes this product special and why your visitors need it in their lives you’ll make it clear for any potential customer who comes across your site, increasing the chance that they’ll click the Buy Now button.When we look at this SEO-wise… by having too many of such thin, low quality content pages on your site you will be dragging down the overall “quality score” of your site. And you run the risk that your site gets devalued by Google’s core algorithm.But even if your site isn’t negatively affected by Google’s core algorithm, it can still be hit by a manual Google penalty. If a human reviewer at Google finds that your site is not following Google’s webmaster quality guidelines, a manual action may be applied to your site (partial or site-wide). As long as your site has a manual action against it, some or all of your pages will be devalued in Google’s search results until you fix the issue(s). When it involves a thin content penalty the manual action may look like this in your Google Search Console. ISSUE 2: DUPLICATE CONTENTAnother issue you will face when using a merchant’s datafeed is that you’re not the only affiliate who is using the datafeed. It’s likely other affiliates are using the same datafeed on their sites too. That means the same product descriptions will end up on multiple websites. Let’s take a look at another thin product page example. Also in this example the product information comes straight from the merchant’s datafeed – click on the image below to enlarge it. When copying and pasting the first 2 sentences of the product description into Google you’ll see that about 20 sites are all using the same product description. As you know, the key to running a successful affiliate business is to make your site stand out against the competition. If your product descriptions are identical to your competitors’, potential customers will have no reason to choose you over them. In addition when potential customers realize they’ve read the same content elsewhere, that experience can reduce their trust in your site and likeliness that they’ll visit your site again in the future.When we look at this SEO-wise… to avoid a bad user experience search engines don’t want their users to land on the same content over and over again. If there are multiple pages with the same content across different domains, Google will simply decide which page they want to show to their users for a given search query and which ones to ignore.Simply put: if your site has the same copy as dozens or hundreds of other affiliate sites, there’s no reason why Google would choose your page over all the other pages with the same copy for a given search query. But when you go the extra mile by writing unique, rich and full product descriptions, you don’t force Google and other search engines to choose between multiple pages with the same content.ISSUE 3: BORING BOILERPLATE COPYFinally manufacturers’ product descriptions in datafeeds are most of the time boring boilerplate copy rather than engaging, useful copy designed to connect with potential customers.Your product copy should be rich and interesting. Visitors to your website have a very short attention span, and your job is to make sure they stay focused on your product for long enough so they click the buy now button. To do this, you need to capture their emotions, not just their logic.The goal is to draw visitors in and make them feel like they’ll have a happy, simple life if only they buy this product. You can’t make false claims, of course, but don’t be afraid to get colorful.Good product descriptions should use lots of adjectives and attention-grabbing words. If you’re describing a cooking pot, saying it’s a stainless steel pot with heat-resistant handles won’t convince anyone to part with their money over it. But describing in loving detail how this pot distributes heat evenly over a surface so that you can get a perfect saute every time will catch the attention of kitchen enthusiasts.GOOGLE WEBMASTER GUIDELINESIn the Webmaster Guidelines for Affiliate Sites Google explains exactly how the above issues may negatively affect your rankings. The guidelines clearly state that thin and duplicate affiliate pagescan suffer in Google’s search rankingsare highly unlikely to perform well in Google search resultsmay be negatively perceived by search engines The good news, however, is that Google also tells you exactly what to do to make your site stand out to distinguish you from other affiliates who are promoting the same products. The guidelines clearly state tocreate websites with original content that adds value for usersmake sure you add substantial value beyond simply republishing content from the original merchantkeep your content updated, relevant, fesh and on-topic If you want to avoid the above issues and comply with Google’s guidelines here’s how to up your product pages for both potential customers and search engines.1. KEYWORD RESEARCHWhen (re)writing your product pages add some keywords (and variations) that you know your customers are searching for. Some simple keyword research can help you get lots of ideas for keywords to use in your product page. Keyword research can also help you get ideas for features you may want to include in your content.Let’s say, for instance, that you’re wanting to sell light bulbs. You may discover that people are searching for “incandescent light bulbs”, “energy-efficient bulbs” and “recyclable bulbs”. Include in your product description that your light bulbs meet both those requirements, increasing your product’s appeal.Be careful not to stuff too many keywords into your product page to try to get a higher search ranking. Search engine algorithms may knock you down for that. Always write for your visitors not for search engines.2. WRITE ENGAGING, USEFUL PRODUCT DESCRIPTIONSThe first step to creating engaging, useful product descriptions is to write a good hook. You want to capture your potential customers’ attention right away, so start with something that will get them excited. There’s a big difference between “Buy a new Buick today,” and “Are you ready to start the engine on your next adventure?”You should also try to connect with the customer as much as possible. People like hearing about themselves, and they’re more likely to buy your product if they can see themselves using it.So talk about your customers’ experience using your product, not just what makes your company great. Paint a picture of how they will feel using your product and how it will improve their life. If you’d like a good example of this kind of appeal, take a look at car commercials; they focus almost to a fault on the experience of driving the car rather than the concrete details.You also want to make sure you stick the landing. Anyone who works in sales will know the first and last sentences of your pitch are what will sell your product. Sum up what your customers stand to gain by buying your product, and give them a specific call to action to follow.3. MAKE IT VISUALLY APPEALINGWhile you’re writing these engaging descriptions, you want to make sure you don’t turn off your customers with the appearance of your page. Large walls of text are intimidating, and no one wants to dive into them. Think about how much easier it is to tackle reading a Twitter feed than it is a New York Times article.Keep your paragraphs short and well-spaced on your description page. Try to limit paragraphs to three sentences or less, with a nice mix of one- and two-sentence paragraphs in there. This will make it easier for your customers to keep reading through your copy and make it to the pitch at the end.You should also try to keep your content as readable as possible. On average, you want to aim for a ninth-grade reading level so you don’t overwhelm your audience with a lot of technical jargon. Sticking to simple, clear descriptions will keep potential customers from getting frustrated and leaving your page.Some ExamplesLet’s take the product description from our first example again. We upgraded the decription from 36 words to about 300+ words trying to solve problem 1: thin content, problem 2: duplicate content and problem 3: boring boilerplate copy. Let’s take the product description from our second example now. We upgraded the decription from 178 words to about 350+ words trying to solve problem 1: thin content, problem 2: duplicate content, problem 3: boring boilerplate copy and problem 4: unreadable massive block of text. In both examples visitors have a better idea now what the products are all about, why the products are special and why they need it. Search engines will no longer see thin and duplicate content on the product pages in question. And by adding additional product pics and/or product videos the product pages in question can be made even more unique and rich in content.How Datafeedr Can HelpHoning your product description writing skills can increase your traffic and sales conversions. It will put you ahead of the majority of affiliates who are promoting the same products as you. Keep in mind that you won’t become an expert overnight. Learning to write great product descriptions that connect with your specific customer base will take time and practice.You can do it all yourself or you can let us do all the hard work for you. There’s no shame in bringing in a pro. We’ve teamed up with some excellent writers who can definitely help to create engaging product descriptions for the products you’re promoting on your site. We would love to help you create a world-class affiliate store optimized for SEO today. If you’re interested in this service don’t hesitate to contact us today to learn more.

Featured image for Blog blog post

Building a WooCommerce Store Using Affiliate Feeds

A couple of weeks ago I spoke with BobWP on his WP eCommerce Show. You can find that talk here https://wpecommerceshow.com/building-a-woocommerce-store-using-affiliate-feeds-with-eric-busch/Here are a few of the topics we discussed:What is Datafeedr and how did it come to be?Is it viable to start up an online store with just affiliate products?For new site owners, how do you get accepted by these affiliate networks with nothing selling on your site?Are there ever instances where store owners will mix affiliate products in with their own products?Is there such as thing as having too many affiliate products in your store?

Featured image for Blog blog post

Eric recently featured on the BobWP podcast

I recently appeared on the Do the Woo podcast with BobWP and Brad Williams. We get into Affiliate data feeds, Constant Contact, GraphQL and visual hooks.You can find the show notes and listen to the episode right here: https://bobwp.com/eric-busch-datafeedr-woocommerce/

Featured image for Blog blog post

Add filter to WooCommerce category metabox on Product Set "edit" page

If you have a lot of categories (like I have on geargrabber.net) you may find that scrolling and finding the category you are looking for is time-consuming. Here’s what the default WooCommerce category metabox looks like on a Product Set “edit” page: You can use the Post Category Filter plugin to add a filter to your WooCommerce category box to make it easy to filter your long list of WooCommerce categories to something more manageable.Here’s what the end result looks like: Simple as that!

Featured image for Blog blog post

Custom WooCommerce Buy Buttons

There are lots of fun things you can do to WooCommerce [Buy Now] and [Add to Cart] buttons.Here I’ll show you a few ways you can customize WooCommerce buttons which appear in The Loop (Shop Frontpage, Shop Category pages, etc…). You can add the code snippets below to a Custom Plugin.First, let’s see how buttons look like be default. Here is a screenshot of 3 products on a category page. All 3 of these products are External (or Affiliate) products so they display a greyed out [Buy Now] button.Default Button Display in WooCommerce LoopThis is how WooCommerce product buttons look by default. Add Highlighting to Buttons for Products On SaleThis one will format the WooCommerce buttons by highlighting the buttons for products which are on sale.Here’s what that would look like: add_filter( 'woocommerce_loop_add_to_cart_link', function ( $html, $product, $args ) { if ( ! $product->is_on_sale() ) { return $html; } $extra_class = ' alt'; $extra_text = ' SALE'; $url = $product->add_to_cart_url(); $quantity = $args['quantity'] ?? 1; $class = isset( $args['class'] ) ? $args['class'] . $extra_class : 'button' . $extra_class; $attributes = isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : ''; $text = $product->add_to_cart_text() . $extra_text; $format = '<a href="%1$s" data-quantity="%2$s" class="%3$s" %4$s>%5$s</a>'; return sprintf( $format, esc_url( $url ), esc_attr( $quantity ), esc_attr( $class ), $attributes, esc_html( $text ) ); }, 20, 3 );Remove Buy/Add ButtonsIn some cases you may want to remove the buttons altogether. This might be useful for the next few code snippets. add_action( 'init', function () { remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' ); } );Add [More Details] Button Linking to Single Product PageNow that the Buy/Add button is gone, we can add some other buttons to The Loop.Here we will add a [More Details] button which links to the single product page. While it’s not that exciting, we will build on this in the following examples. But if you like this, here’s the code:add_action( 'init', function () { add_action( 'woocommerce_after_shop_loop_item', 'mycode_display_more_details_button_to_single' ); } ); function mycode_display_more_details_button_to_single() { global $product; $url = $product->get_permalink(); $text = __( 'More Details', 'mycode' ); $title = sprintf( __( 'View more details about %s', 'mycode' ), $product->get_name() ); $class = sprintf( 'button add_to_cart_button product_type_%s', $product->get_type() ); $format = '<a href="%1$s" title="%2$s" class="%3$s">%4$s</a>'; printf( $format, esc_url( $url ), esc_attr( $title ), esc_attr( $class ), esc_html( $text ) ); }Link Directly to External/Affiliate Site from [More Details] ButtonThe one is strictly for External/Affiliate products. This adds a new [More Details] button which links directly to the external/affiliate website instead of your single product page.This looks very similar to the default functionality of WooCommerce. And here’s the custom code:add_action( 'init', function () { add_action( 'woocommerce_after_shop_loop_item', 'mycode_display_more_details_button_to_external' ); } ); function mycode_display_more_details_button_to_external() { global $product; if ( 'external' !== $product->get_type() ) { return; } $url = $product->get_product_url(); $text = __( 'Buy Now', 'mycode' ); $title = sprintf( __( 'View more details about %s', 'mycode' ), $product->get_name() ); $class = sprintf( 'button add_to_cart_button product_type_%s', $product->get_type() ); $format = '<a href="%1$s" title="%2$s" class="%3$s" target="_blank">%4$s</a>'; printf( $format, esc_url( $url ), esc_attr( $title ), esc_attr( $class ), esc_html( $text ) ); }Add Price to ButtonHere we will add the product’s price (regular or sale price) to the button. This helps prices stand out a bit more. Here’s the custom code for that:add_action( 'init', function () { add_action( 'woocommerce_after_shop_loop_item', 'mycode_display_more_details_button_to_external_with_price' ); } ); function mycode_display_more_details_button_to_external_with_price() { global $product; if ( 'external' !== $product->get_type() ) { return; } $url = $product->get_product_url(); $price = wc_price( $product->get_price() ); $text = sprintf( __( 'Buy %s', 'mycode' ), $price ); $title = sprintf( __( 'Buy %s', 'mycode' ), $product->get_name() ); $class = sprintf( 'button add_to_cart_button product_type_%s', $product->get_type() ); $format = '<a href="%1$s" title="%2$s" class="%3$s" target="_blank">%4$s</a>'; printf( $format, esc_url( $url ), esc_attr( $title ), esc_attr( $class ), $text ); }Add Merchant’s Name to ButtonHere’s another one that works well for External/Affiliate products. We can also add the merchant’s name to the button. add_action( 'init', function () { add_action( 'woocommerce_after_shop_loop_item', 'mycode_display_more_details_button_to_external_with_merchant_name' ); } ); function mycode_display_more_details_button_to_external_with_merchant_name() { global $product; if ( 'external' !== $product->get_type() ) { return; } $url = $product->get_product_url(); $merchant = $product->get_attribute( 'pa_merchant' ); $text = $merchant ? sprintf( __( 'Buy at %s', 'mycode' ), $merchant ) : __( 'Buy Now', 'mycode' ); $title = sprintf( __( 'View more details about %s', 'mycode' ), $product->get_name() ); $class = sprintf( 'button add_to_cart_button product_type_%s', $product->get_type() ); $format = '<a href="%1$s" title="%2$s" class="%3$s" target="_blank">%4$s</a>'; printf( $format, esc_url( $url ), esc_attr( $title ), esc_attr( $class ), esc_html( $text ) ); }Those are all for the WooCommerce Loop but if you want to make similar customizations on the Single Product Page, you would want to use the woocommerce_after_single_product_summary hook.

Featured image for Blog blog post

Price Comparison Sets Plugin for WooCommerce Released Today!

We just launched our new Price Comparison Sets plugin for our WooCommerce/API users! The Datafeedr Comparison Set plugin automatically creates price comparison sets for any product in your WooCommerce store or by using a shortcode.Download now

Featured image for Blog blog post

Normalizing brand names when importing affiliate data feed into WooCommerce

WooCommerce is great for importing data feeds into and using for your datafeed-driven affiliate store. However, one of the frustrations of using data feeds is data inaccuracy. Datafeedr tries to normalize data before it hits our database but we can’t normalize everything.That’s why it’s important for users to be able to normalize information before it gets inserted into your store.In the normalizing brand names documentation article we just published, you can learn how to normalize all of your product’s brand names.So instead of those new shoes you just imported being listed under the brand names “Nike Co.” or “Nike Inc” or “Nike International”, now they can all simply be listed with the brand name “Nike”.

Featured image for Blog blog post

Modifying WooCommerce Product URLs

Before WooCommerce 2.5, it was possible to change/modify/override the URL to the product page using a filter on the the_permalink hook. For example, you could do this:add_filter( 'the_permalink', function ( $url ) { global $product; if ( ! empty( $product ) ) { $url = 'http://www.google.com'; } return $url; } );That would change all of the links to your product pages to a link to Google instead. If you felt compelled to give Google more Page Rank, you could do that. However, in version 2.5 of WooCommerce, that code no longer works.Instead you need to remove WooCommerce’s woocommerce_before_shop_loop_item action and then re-add it again with your own function. Here’s a version:add_action( 'init', function () { remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open' ); } ); add_action( 'woocommerce_before_shop_loop_item', function () { $url = 'https://www.datafeedr.com/'; echo '<a href="' . $url . '">'; }, 20 );Now all links to the product pages which are generated within the Loop on your site will be linked to Datafeedr! Yay! We could use a little help with Page Rank.

Featured image for Blog blog post

New "Media Library Filter" plugin released today

When your WordPress site starts to grow and you have lots of images in your library from Posts, Pages, Products and other WordPress content types, filtering the the media in your library becomes very difficult.I thought for sure there would be a plugin available that would enable filtering of the media in my Media Library… but there wasn’t much. What I did find was a post on StackExchange from 2013 with a quick solution. So I spent a couple of days and put together the Media Library Filter plugin. The Media Library Filter plugin allows you to filter the media in your library by taxonomy or term.A taxonomy would be the type of category. For example some taxonomies might be Blog Categories, Product Categories, Post Tags, etc.A term would be the name of an item in the category. For example the taxonomy Product Categories might contain the terms “Rock Climbing Shoes” and “Rock Climbing Helmets”.If you have a suggestion or way to improve, please let us know.

Featured image for Blog blog post

WooCommerce Integration is Here!

You spoke, we listened! We’ve now integrated WooCommerce (the leading ecommerce platform for WordPress) with our massive database of 250 million affiliate products to give you a simple yet powerful affiliate store building solution. What does this mean to you?Automatic product updatesOne fee, unlimited storesUnlimited products per storeProduct ratings and reviewsResponsive layoutsFaceted searchEasy-to-use interface in your WordPress admin areaConfigurable update settingsHooks & filters to customize product dataMore end-user browsing featuresMore search query optionsMore product fields… and the list goes on!Learn how to get started or SIGN UP NOW!Questions?Feel free to ask your questions below or contact us.

Featured image for Blog blog post

Core Contributor to WordPress 3.8

We are excited to announce that Datafeedr was able to help a little in the new release of WordPress 3.8 and received core contributor acknowledgements! 🙂

Featured image for Blog blog post

Create your own WordPress shortcode for Permalinks

I cringe every time I see a link in a blog post that is an absolute URL to other content on the same site. Here’s an example of what I mean:<a href="http://www.mysite.com/blog/post-name">vehicula</a>In that example post you see a link to another page in my blog.But what happens when you edit the slug of the post? The link will break.Or what happens if you move your blog from /blog to /news? The link will break.Or even worse, what happens if you change the domain where the content is hosted from http://www.mysite.com to http://blog.mysite.com? The link will break.That’s why I cringe every time I see a link with an absolute URL to another page on the same site.What’s the solution? Shortcodes.Here’s an example of how to programmatically add links to your posts without being susceptible to the problems I mentioned above. The following code can be added to your theme’s functions.php file or to a custom plugin you might have./** * Creates a shortcode that links to other * content on your site. */ function my_permalink_shortcode($atts) { // Check that $id exists. $id = intval($atts['id']); if ($id <= 0) { return; } // Check that $id has a URL. $url = get_permalink($id); if ($url == '') { return; } // Get link option and title. $link = ($atts['link'] == '1') ? true : false; $title = (trim($atts['title']) == '') ? get_the_title($id) : $atts['title']; // Determine if we create a link. if ($link) { return '<a href="'.$url.'">'.$title.'</a>'; } else { return $url; } } add_shortcode('pl', 'my_permalink_shortcode');After you add that code to your site, here’s how you can use it when writing a blog post or page.To get the link to another post on your site all you need is the ID of the post you want to link to. Then in your post you would do something like this:<a href="[pl id='123']">vehicula</a>Now my link’s URL will be generated from the database and no matter how much we edit the other post’s slug or path, the correct URL will always appear in this link.What if you want to avoid creating the <a href="">...</a> HTML code? That’s easy. Just do this:[pl id='123' link='1']Now when the post is rendered, the <a> tag will automatically be created and the title of the post will show up.If you want to control the title of the link, you can do this:[pl id='123' link='1' title='link to me']Let me provide one last example to clear up any confusion… Let’s say you wrote a post on your blog. The post you wrote is titled Hello, World!, it has a slug of hello-world and the post has the ID of 33.Here’s what the shortcode would look like in your posts and what would be returned:EXAMPLE: [pl id='33'] RETURNS: http://wwww.mysite.com/hello-world ------------ EXAMPLE: <a href="[pl id='33']">read me</a> RETURNS: <a href="http://wwww.mysite.com/hello-world">read me</a> ------------ EXAMPLE: [pl id='33' link='1'] RETURNS: <a href="http://wwww.mysite.com/hello-world">Hello, World!</a> ------------ EXAMPLE: [pl id='33' link='1' title='Read!'] RETURNS: <a href="http://wwww.mysite.com/hello-world">Read!</a>Hope this helps future-proof the links in your blog posts.

Featured image for Blog blog post

MO.com features Eric from Datafeedr.com

MO.com featured Eric from Datafeedr.com in one of their video interviews. MO.com shines a light on the people that make an impact on Small Business. Interviews with entrepreneurs, small business owners, angel investors, venture capitalists, government policy makers, marketing agencies, pr companies, and more… all designed to learn and share their Method of Operating… their M.O.