WooCommerce integration settings

WooCommerce is an eCommerce platform based on WordPress that is easy to configure and customize.

To download the plugin, click HERE


If you need help


Contents

  1. Basic information
  2. Configuration
  3. Technical description

1. Basic information

The plugin sends SALESmanago the data of contacts who create an account (register) or make a purchase as a guest in the store based on WooCommerce. Purchase (PURCHASE) and add to cart (CART) events are also sent.

2. Configuration

[1] Contact owner: Select the contact owner from the list to which the contacts acquired from WooCommerce will be assigned.

[2] Tags: The given tags will be assigned to the contacts after certain actions. Subsequent tags can be entered after a comma. After saving, all tags will be processed: lowercase letters will be converted to uppercase, and spaces will be converted to underscore (_).

Another element is the opt-in field (newsletter signup). Both WordPress and WooCommerce do not offer a newsletter feature; our plugin offers the possibility to create or map a field (checkbox) to confirm the subscription to the newsletter.

[A] Map existing field: This option allows you to map the value of a field that has already been added to the registration form (or purchase form), such as by modifying the template or a plugin that allows editing of the purchase form fields. It is recommended to use the default field name (sm-optin), but you can also define your own name.

Advanced users can check the name of an existing checkbox through the browser’s developer tools. 

For example, in Google Chrome, open the element selection tool (ctrl + shift + c) and click the newsletter subscription checkbox [1].

In the developer tools, the code responsible for the selected checkbox will be highlighted on the list of DOM elements. One of its attributes will be name [1], the value of which should match the SALESmanago plugin settings.

[B] Add field to form: Selecting this option allows you to add a checkbox to the registration form (or purchase form).

Example of the newsletter signup box design [1].

WSKAZÓWKA: Pole to możesz dostosować przy użyciu klasy css sm-opt-in-input.

WSKAZÓWKA: Dla witryn udostępniających treści w wielu językach dodana została obsługa wbudowanego tłumaczenia napisu (label) znajdującego się koło pola checkbox. Aby przetłumaczyć ten napis na inne języki użyj wtyczki zewnętrznej firmy. Jeśli nie wiesz, która będzie dla ciebie najlepsza, zacznij od Loco Translate.

Translating label with Loco Translate plugin:

In the SALESmanago plugin settings in the WooCommerce tab, in the subtitle (label) field, you need to specify a default value to be displayed (usually, it should be English).

You have to download and install the Loco Translate plugin and then choose the translation plugins Menu -> Loco Translate [1] -> Plugins [2] from the main menu. Choose SALESmanago from the list of available plugins [3].

Next, either create a new translation language [1] or edit an existing one [2].

When creating a new language, select it from the “WordPress language” list [1]. In the “Choose a location” section, it is best to select the last option [2].

In the translation panel, translate the “!optInInputLabel” [1]. In most cases, this will be the first caption available for translation. The translation should be specified in the bottom field [2].

TIP: All HTML tags are allowed.

Hook purchase

Hooks are a mechanism of WordPress (and many other eCommerce platforms) that triggers a certain action (for the SALESmanago plugin, it can be sending a contact to SALESmanago) at a precise moment. To ensure that it works properly with different payment mechanisms and order processing methods, our plugin allows you to choose the hook that handles the purchase event. The default hook is woocommerce_order_status_changed because it allows purchase events to work correctly in most cases. In some situations, it may be necessary to change the hook. The most common problems that can be solved by changing this setting are double (multiple) uploading of purchase events or no uploading of purchase events to SALESmanago.

3. Technical description

Hooks used by WooCommerce integration:

  • woocommerce_order_status_cancelled
  • woocommerce_order_status_refunded
  • woocommerce_checkout_update_user_meta
  • woocommerce_customer_save_address
  • profile_update
  • user_register
  • wp_login
  • woocommerce_add_to_cart
  • woocommerce_update_cart_action_cart_updated
  • woocommerce_remove_cart_item

and one of the selected purchase hooks:

  • woocommerce_order_status_changed (default)
  • woocommerce_checkout_order_processed
  • woocommerce_checkout_update_order_meta
  • woocommerce_pre_payment_complete
  • woocommerce_payment_complete

Hooks used when creating a newsletter field:

  • register_form
  • woocommerce_register_form
  • woocommerce_review_order_before_submit (option to include a field in the checkout)

The names of the fields sent to SALESmanago:

  • billing_email
  • billing_first_name
  • billing_last_name
  • billing_city
  • billing_company
  • billing_phone
  • billing_postcode
  • billing_address_1
  • billing_address_2
  • billing_country

Store location:

  • md5(get_permalink(wc_get_page_id(‘shop’)))
    • md5(get_home_url()) (if the previous option fails)
  • md5($_SERVER[‘SERVER_NAME’]) (if the previous option fails)
If you need more information about the topic mentioned above, please contact us: support@salesmanago.com +1 800 960 0640