Use WooCommerce with affiliate products

Turn affiliate-toolkit products into WooCommerce products with current prices, images, categories and a price comparison tab.

With the WooCommerce Connector, every shop interface of affiliate-toolkit becomes a data source for WooCommerce. affiliate-toolkit imports a product, creates an external/affiliate product in WooCommerce from it and keeps price, images and texts up to date. Visitors browse your WooCommerce shop and the buy button leads to the merchant with your affiliate link.

Prerequisites: WooCommerce is installed and active, affiliate-toolkit with the WooCommerce Connector module (included in the passes) and at least one connected shop (see What is a shop in affiliate-toolkit?).

1. Enable the connector

Install the WooCommerce Connector and activate its license. Then open affiliate-toolkit → Settings → WooCommerce and set WooCommerce mode to "Enabled". If the page shows "WooCommerce Extension is not activated", the WooCommerce plugin itself is missing or inactive.

Settings → WooCommerce: mode, export of images, description and categories, button text and price comparison tab for WooCommerce products.
Settings → WooCommerce: mode, prices, images, categories and texts.

2. Create WooCommerce products

There are several ways to turn an affiliate product into a WooCommerce product:

  • On the product – import or open a product under affiliate-toolkit → Products, tick Is WooCommerce product on the product information tab and save. The WooCommerce product is created in the background; a link to it then appears on the product.
  • In the product import – search the shop under affiliate-toolkit → Product import and click Import for WooCommerce.
  • From a list – set Default import state to "WooCommerce product" under Settings → Advanced settings and tick Auto import products in the list. All products of the list are then created as WooCommerce products.
  • With WP All Import – set the custom field atkp_product_iswoocommerce of the affiliate-toolkit product to 1.
The product information tab with the "Is WooCommerce product" option that creates a WooCommerce product from the affiliate product.
The option "Is WooCommerce product" on the product information tab.

You can switch existing products to WooCommerce products at any time in the same way.

3. Add offers for the price comparison

A WooCommerce product shows the offers of the affiliate-toolkit product. Add further shops in the Filter Information box of the product – usually by EAN – and enable the price comparison tab in the settings. The buy button links to the offer chosen under "Shop Button Target".

The "Filter information" box of a product: Amazon with the ASIN as main shop plus eBay, AWIN, billiger.de and Geizhals searched by EAN for the price comparison.
Amazon as main shop plus further shops by EAN for the price comparison.

All settings

SettingWhat it does
WooCommerce modeSwitches the export on. Data flows only from affiliate-toolkit to WooCommerce, not back.
Execute do_shortcode before writing text.For themes that do not run shortcodes on product or archive pages. Enable it if you see [atkp…] shortcodes instead of content. Takes effect with the next product update.
Ongoing title updateBy default title and permalink are only written when the WooCommerce product is created. With this option they are updated regularly – changing URLs can affect SEO.
Button textText of the "add to cart" button; %s is replaced by the shop name. Takes effect with the next product update.
Activate price comparison tab for WooCommerceAdds a "Price Comparison" tab with all offers to the product page. Depending on the theme it appears as a tab or an accordion.
Price comparison tab templateTemplate used in the price comparison tab instead of the default.
Regular Price / Sale PriceWhich price is written as regular and as sale price. Default: list price and sale price; minimum or maximum price of all offers are also possible. If both are equal, only the regular price is written.
Change product status to draft when price is equal zero …Sets products without a price to draft and publishes them again when an offer exists. Not recommended, because pages going offline and online can hurt SEO.
Change catalog visibility to hidden when price is equal zeroHides products without a price from the shop pages while the product page itself stays online. The better option of the two.
Export product categories to WooCommerceWrites the product categories of affiliate-toolkit to the WooCommerce product categories and creates them if necessary. The "old copy function" variant only transfers one category and is not recommended.
Key typeHow WooCommerce and affiliate-toolkit products are linked: the affiliate-toolkit ID (recommended, always unique) or the EAN (not always available). "Replace IDs in WooCommerce product upon saving" switches existing products from one key type to the other – only use it if you know what you are doing.
Custom EAN fieldThe field that stores the key. Default is the SKU. Do not change it later, or the link between the products is lost.
Shop Button TargetWhich offer the button links to: the main product (default), the cheapest or the most expensive offer.
Product image / Image galleryImport the main image or the gallery into the media library, or link the external images. Importing slows down product updates; for external images the FIFU plugin is recommended (the gallery requires FIFU Premium).
Export description / Export short descriptionDo not export, export the text as it is, or use a description template in which you combine the product fields with shortcodes. Exported texts are updated with every product update.
Show disclaimerAdds the affiliate disclaimer with update date and time to the bottom of every product page.

If you already have WooCommerce products with EANs, you can link them to affiliate-toolkit products with WP All Import. Contact us if you need help with this.

Shortcodes and widget on product pages

On a WooCommerce product page, affiliate-toolkit shortcodes find the linked product automatically – you do not need an ID:

[atkp_product template='wide'][/atkp_product]

The affiliate-toolkit widget with "Use main product" also shows the product of the current WooCommerce page, for example in the sidebar. See Show products in the sidebar with the affiliate-toolkit widget.