Related Products, Up-sells, Cross-sells in WooCommerce, Shopify, Magento

When you are building your website, it’s important to be mindful of how visitors will navigate through the site. If your customer visits a product, we should show other related products. For example:

  • Fashion & clothing stores – Upsell a gift packaging which you can easily wrap yourself. For example a gift wrap
  • Gadgets & tech stores – Upsell an extended warranty for your (selected) products
  • Adult, cannabis, weed & marijuana stores – Upsell a private and smell proof packaging
  • Services & SaaS stores – Upsell access to premium customer service

Product pages can present unique opportunities and challenges in this context. While the main focus is on the product itself, there’s also an opportunity to display, and cross-sell complementary products.

In this post, we will be looking at the different ways developers can build “smart” options for recommending related products. I’ll also show you how to create a section that displays related products by tag, which will empower your clients to personalize each one of their product pages.

WooCommerce Related Products

In WooCommerce, Product Related could be config in three different ways: Up-sells, Cross-sells and Related by categories, tags.

To add an up-sell or cross-sell to a product:

  1. Go to WooCommerce > Products and select the product on which you’d like to show an up-sell or cross-sell.
  2. Scroll down to the Product Data panel.
  3. Select the Linked Products tab on the left menu.
  4. Add the product you wish to link to by searching for it.
  5. Update.

WooCommerce hide related products

If you want woocommerce disable related products or woocommerce hide related products you just do following:

  1. Go to WooCommerce > Products and select the product on which you’d like to show an up-sell or cross-sell.
  2. Scroll down to the Product Data panel.
  3. Select the Linked Products tab on the left menu.
  4. Remove the product you wish to hide.
  5. Update.

Setup Magento crosssell, magento upsell, magento Related Products

You can setup Magento crosssell, upsell, related products by defining the nature of the relationship between the products

Magento upsell

Up-sell products are items that are similar, but are perhaps of a higher-quality, more popular, or have a better profit margin than the item the customer is considering.

Up-sell products are items that your customer might prefer instead of the product currently considered. An item offered as an up-sell might be of a higher quality, more popular, or have better profit margin. Up-sell products appear on the product page under a heading such as, “You may also be interested in the following product(s).”

To add up-sell product on Magento you need do following steps:

  1. Go to Admin > Products
  2. Open the product in edit mode
  3. Scroll to the section “Related Products, Up-Sells, and Cross-Sells”
  4. Click to Add Up-Sell Products
  5. Use filter to select the products that you want.
  6. Add Selected Products

magento related products

 

Magento crosssell

Magento Cross-sell products are offered on the shopping cart page as last-minute purchases before the checkout process begins. Cross-sell items are similar to impulse purchases positioned next to the cash register in the checkout line. Products offered as a cross-sell appear on the shopping cart page, just before the customer begins the checkout process.

To add cross-sell product on Magento you need do following steps: (Just similar add the upsells)

  1. Go to Admin > Products
  2. Open the product in edit mode
  3. Scroll to the section “Related Products, Up-Sells, and Cross-Sells”
  4. Click to Add Cross-Sell Products
  5. Use filter to select the products that you want.
  6. Add Selected Products

Magento Related Products

Magento Related products are meant to be purchased in addition to the item the customer is viewing. The customer can place the item in the shopping cart by simply clicking the checkbox. The placement of the Related Products block varies according to theme and page layout. In the example below, it appears at the bottom of the Product View page. With a 2 column layout, the Related Product block often appears in the right sidebar.

To add Related products on Magento you need do following steps: (Just similar add the upsells)

  1. Go to Admin > Products
  2. Open the product in edit mode
  3. Scroll to the section “Related Products, Up-Sells, and Cross-Sells”
  4. Click to Add  Related Products
  5. Use filter to select the products that you want.
  6. Add Selected Products

Add Related Products Shopify

The simplest way to recommend related products is to install a related products app. There are several apps for product recommendations. We have tried some apps and see Globo Related Products are the best one. It is Free for Related Products, If you want to Also Bought Products you could charge fee. You can contact to app developer to get more free trial or discount.

If you don’t want to use app, please following to custom your theme

Then copy and paste the following code to related-products.liquid file

{% if section.settings.show_related_products == true %}
<hr>
<div class="product-template__container page-width" itemscope itemtype="http://schema.org/Product" id="ProductSection-{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="product" data-enable-history-state="true">
 
{% comment %}
  Number of related items per row,
  and number of rows.
{% endcomment %}

{% assign number_of_related_products_per_row = section.settings.related_grid_num %}
{% assign number_of_rows = section.settings.related_grid_row %}

{% comment %}
  Heading.
  Leave blank if you don't need one.
{% endcomment %}

{% assign heading = section.settings.related_title %}

{% comment %}
  Set either or both to true, if you want
  to limit yourself to items with same vendor, and/or type.
{% endcomment %}

{% assign same_vendor = false %}
{% assign same_type = false %}

{% comment %}
  Collections to ignore.
  Never pick related items from those.
{% endcomment %}

{% assign exclusions = 'frontpage,all' | split: ',' %}

{% comment %}
  Looking for a relevant collection.
{% endcomment %}

{% if product.metafields.c_f['Related Products'] %}
  {% assign collection = collections[product.metafields.c_f['Related Products']] %}
{% endif %}

{% assign found_a_collection = false %}
{% if collection and collection.all_products_count > 1 %}
  {% unless exclusions contains collection.handle %}
    {% assign found_a_collection = true %}
  {% endunless %}
{% endif %}
{% unless found_a_collection %}
  {% for c in product.collections %}
    {% unless exclusions contains c.handle or c.all_products_count < 2 %}
      {% assign found_a_collection = true %}
      {% assign collection = c %}
      {% break %}
    {% endunless %}
  {% endfor %}
{% endunless %}

{% comment %}
  If we have a relevant collection.
{% endcomment %}

{% if found_a_collection %}

  {% assign counter = 0 %}
  {% assign break_at = number_of_rows | times: number_of_related_products_per_row %}
  {% assign current_product = product %}
  
  {% case number_of_related_products_per_row %}
    {% when '1' %}
      {% assign grid_item_width = '' %}
  {%- assign max_height = 700 -%}
    {% when '2' %}
      {% assign grid_item_width = 'small--one-half medium-up--one-half' %}
  	  {%- assign max_height = 530 -%}
    {% when '3' %}
      {% assign grid_item_width = 'small--one-half medium-up--one-third' %}
      {%- assign max_height = 345 -%}
    {% when '4' %}
      {% assign grid_item_width = 'small--one-half medium-up--one-quarter' %}
  {%- assign max_height = 250 -%}
    {% when '5' %}
      {% assign grid_item_width = 'small--one-half medium-up--one-fifth' %}
  {%- assign max_height = 195 -%}
    {% when '6' %}
      {% assign grid_item_width = 'small--one-half medium-up--one-sixth' %}
  {%- assign max_height = 195 -%}
    {% else %}
      {% assign grid_item_width = 'small--one-half medium-up--one-quarter' %}
  {%- assign max_height = 195 -%}
  {% endcase %}


  {% capture related_items %}
<div class="grid grid--uniform{% if collection.products_count > 0 %} grid--view-items{% endif %}">

  {% for product in collection.products %}
  {% unless product.handle == current_product.handle %}
  {% unless same_vendor and current_product.vendor != product.vendor %}
  {% unless same_type and current_product.type != product.type %}
  <div class="grid__item {{ grid_item_width }}">
    {% include 'product-card-grid', max_height: max_height %}
  </div>
  {% assign counter = counter | plus: 1 %}
  {% if counter == break_at %}
  {% break %}
  {% endif %}
  {% endunless %}
  {% endunless %}
  {% endunless %}
  {% endfor %}
</div>
  {% endcapture %}

  {% assign related_items = related_items | trim %}

  {% unless related_items == blank %}

  <aside class="grid">
    <div class="grid__item">
      {% unless heading == blank %}
      <header class="section-header">
        <h2 class="section-header__title">{{ heading }}</h2>
      </header>
      {% endunless %}
      <div class="grid-uniform">
        {{ related_items }}
      </div>
    </div>
  </aside>

  {% endunless %}
     
{% endif %}
  
</div>
{% endif %}

{% schema %}
{
  "name": "Related products",
  "settings": [
    {
      "type": "checkbox",
      "id": "show_related_products",
      "label": "Show related products",
      "default": false
    },
    {
      "id": "related_title",
      "type": "text",
      "label": "Section title",
      "default": "Other fine products"
    },
    {
      "type": "select",
      "id": "related_grid_num",
      "label": "Products per row (Desktop)",
      "default": "4",
      "options": [
        {
          "value": "2",
          "label": "2"
        },
        {
          "value": "3",
          "label": "3"
        },
        {
          "value": "4",
          "label": "4"
        },
        {
          "value": "5",
          "label": "5"
        }
      ]
    },
    {
      "type": "select",
      "id": "related_grid_row",
      "label": "Number of rows (Desktop)",
      "default": "1",
      "options": [
        {
          "value": "1",
          "label": "1"
        },
        {
          "value": "2",
          "label": "2"
        },
        {
          "value": "3",
          "label": "3"
        }
      ]
    }
  ]
}
{% endschema %}

woocommerce hide breadcrumbs

Depending on the users’ design and requirement, they need to have woocommerce hide breadcrumbs. The aim of breadcrumbs is to filter products, as well as identify the website structure from which users can search for information with the least operations.

woocommerce hide breadcrumbs

Breadcrumbs play an important role in supporting users as well as promoting SEO such as an increase in the rate of keywords and clicks, and a decrease in the rate of page-exiting, etc. However, in small pages, landing pages are not necessary to contain breadcrumbs. It is the reason why we write this article which focuses on woocommerce hide breadcrumbs.

There are two ways to hide breadcrumbs on the WordPress website in which woocommerce installation includes

Way no. 1: Use CSS to hide breadcrumbs

It is an easy way that many people can do. Most people think of this way first because you just find its exact class and hide it by the familiar css attribute display:none.

Way no. 2: remove breadcrumbs via php code

You get to the theme folder you are using, then find function.php file. You open this file and insert the code below in the last paragraph of the file. Save the file, then get back to the website, reload the website to check.

// Remove breadcrumbs from shop & categories

add_filter( ‘woocommerce_before_main_content’, ‘remove_breadcrumbs’);

functionremove_breadcrumbs() {

if(!is_product()) {

remove_action( ‘woocommerce_before_main_content’,’woocommerce_breadcrumb’, 20, 0);

}

}

We have solved the issue related to woocommerce hide breadcrumbs on the website. You can use any way you want. However, I suggest that you should use the second way which uses php code to add to the function file. If you have any problem, please leave a comment. We will support you for free.

 

How to create woocommerce purchase note

woocommerce purchase note is messages that customers send to the store when purchasing. The messages could be notes of address, or reminders to remind admin the date of goods delivery. This article will help you understand what purchase note on woocommerce is as well as how it works, where the data display, and how to eliminate it when unnecessary.

woocommerce purchase note

Display purchase note

In order to see the note contents from customers, you get to Order of Woocommerce. When getting to each order, you will see the content as the figure below

woocommerce purchase note

Change the purchase note placeholder

You can replace the default placeholder of Woocommerce purchase note with the syntax of the following command. You should remember that it only works when being added to function.phpin the theme folder file.

add_filter( 'woocommerce_checkout_fields', 'ht_woocommerce_checkout_fields' );
/**
* Change Order Notes Placeholder Text - WooCommerce
*
*/
functionht_woocommerce_checkout_fields( $fields ) {
$fields['order']['order_comments']['placeholder'] = 'Your custom placeholder';
return $fields;
}

Now, the checkout page in the front end will display like that

woocommerce purchase note

Remove woocommerce purchase note

woocommerce purchase note is seen not to be a required field. You can enter it or not. Therefore, there are two ways of hiding this field

The first way is using css to hide it.

.woocommerce-additional-fields {display:none}

You add this code to css. file. Press F5 button to check.

woocommerce purchase note

 

The second way is safer. If you accidentally add a field with the same class as the class in the figure above, this field will be hidden by chance. Therefore, you should add it to function.php file, then add the below code

add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );

After the article Woocommerce purchase note, you must have known to use it properly depending on the project that you are developing requires purchase note or not. I have worked on many projects so I see that there are many custom requirements in orders. For instance, customers want to add/delete a field, change the order of data displayed, and retrieve users’ data to deliver to the back end for the admin to check. If you are using woocommerce, you should read our next articles. We will have more articles about customer checkout page as well as order. But if you are using Prestashop, I suggest that you should use Order edit module. Because this module helps arrange, edit, and add new orders easily.

 

woocommerce csv import variable products

woocommerce csv import variable products are interested by many people because some logins do not support to import products including variables. However, lots of shops and suppliers sell products including variables. This article will help you.

Create Your Variations CSV

Firstly, you create a csv file which includes product information such as name, image, etc. to save in database. To make sure that you use a correct file and avoid errors, you should use the sample file of woocommerce or plugin.

In Product item, you see Export as below.

Woocommerce csv import variable products

In the next window, you click on Generate CSV as below

Woocommerce csv import variable products

 

If you are using plugins, there will more options forcsv files by selecting export fields to the file as below. The advantage, in this case, is that only necessary fields are exported, which makes the csv file simpler and more convenient for future editing.

Woocommerce csv import variable products

To us, woocommerce csv import variable products will be perfect and work smoothly if you have a well-prepared file with the right format. Our experience is that you import one or two products perfectly. Then you export these data to the csv file to make a sample file other products. In order not to waste too much time on editing the csv file, you should try importing several products. If everything works well, you can start importing products in bulk.

Configure woocommerce csv import variable products

After having a correct csv file which matches with the sample csv file, we start to import products.

Step 1: Upload CSV file as below. We search for the file we have prepared. Then click on Continue

Woocommerce csv import variable products

In addition, you can also click on “Show advanced option” to configure more highly. There is one option which you can use to update products. For example, you want to increase the price or other information of products from another csv file, you just need to click on Update existing products as below.

Woocommerce csv import variable products

Step 2: In this step, you view the information on the left side and edit information on the right side. If your products include variables, you should pay attention to fields such as Attribute name, Attribute value as below.

Woocommerce csv import variable products

After selecting and configuring the above fields, you click on Continue button. The process of importing products starts. Now, you just need to wait for products imported in bulk. You must be surprised when realizing that it takes only from five to seven minutes to import thousands of new products or update existing products. Comparing with importing manually, it is unimaginable.

Woocommerce csv import variable products

Thanks for reading this article about import variable products in woocommerce. All source codes such as Shopify, Magento, Prestashop support to import products by default. However, import product modules and apps have more high-up features. If this article is helpful for you, please share it with others. If you have any comment, please leave a comment below or contact us.

 

 

products not showing in woocommerce

products not showing in woocommerce is a commonly case you may face when you start e-commerce on this platform. There are many causes of this problem which sometimes are extremely silly. In this article, I will mention causes that you do not see.

Due to the developer

You are the developer editing the code of the woocommerce web page. If you face this case, you should check the code. Please make sure that you do not use command die() in php or comments. Also, you should check if css and javascript codes have effects on your site. You can check by moving on to another default active theme or on the backup theme. If the products do not show up, you should have known what the problem is.

Due to cache

This case is rare but it does not mean you will not face it. There are server cache and browser cache. If the cause is server cache, you should contact the hosting and server service supplier and require them to enable the cache so that you can work. If the problem is due to browser cache, you can clear it or use incognito browsers to solve it.

products not showing in woocommerce

You have not published products

You should check if your products are in public status. If they are in another status, they cannot be displayed.

My croatian translation of products is not showing in woocommerce

You may face the case if you use plugins supporting translation such as wpml. The products can be inputted manually or by using import product module.

products not showing in woocommerce

When you face this problem, keep calm, disable each plugin and check again. Maybe plugins conflict together.

Besides, the problem may be caused by the errors in database. If you use wpml, please do as the following guidance.

Firstly, back up your web page including codes and database

  • In back office, get in “WPML > Support
  • Click on “troubleshooting”
  • In “General Cleanup”, click on the following buttons:
  • “Cleanup General” button (if it exists in your setup)
  • “Fix element_type collation” button
  • “Set language information” button

Hope that you can solve your problem. If not, you should contact wpml for support.

You have run through the problem related to products not showing in woocommerce. You must have had your own solution. If you have any idea, please leave a comment below.

woocommerce remove additional information checkout

woocommerce remove additional information checkout is the way helping us remove unnecessary information on the checkout page. By default, the system has some required fields customers must fill in when carrying out the payment. However, depending on your purposes, you can add or delete fields properly. This article will help you solve the above problem.

If you are a woocommerce newbie, I suggest that you should study the document about it. The document which helps save much time in the future is quite detailed. Right now, we will go straight to the main point woocommerce remove additional information checkout.

woocommerce remove additional information checkout

In order to edit things in the front end of woocommerce, you can install plugin, or find code of woocommerce plugin to edit. However, the safest as well as the most effective way is that you insert code to function file.php. This way ensures that your plugin will not be edited, which facilitates update the system as well as the plugin.

Delete Company and Phone field.

In theme folder of your current website, you move to function.php file and copy the code below and paste in the final part of the file. You could view the comment in code to understand the purpose of each code.

functionwc_ht_remove_checkout_field( $fields) {
  unset( $fields['billing']['billing_company'] );  //  Removes the Company Field.
  unset( $fields['billing']['billing_phone'] );   //  Removes the Phone Field.
 return $fields;
}
add_filter( 'woocommerce_checkout_fields', 'wc_ht_remove_checkout_field');

Remove ‘order notes’ from checkout

function wc_ht_remove_checkout_field( $fields) { 
unset($fields['order']['order_comments']); // remove order comment fields 
return$fields; }
add_filter( 'woocommerce_checkout_fields', 'wc_ht_remove_checkout_field');

Remove billing details from WooCommerce checkout

functionwc_ht_remove_checkout_field( $fields) {
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
unset($fields['billing']['billing_city']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_country']);
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_phone']);
unset($fields['order']['order_comments']);
unset($fields['billing']['billing_address_2']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_email']);
unset($fields['billing']['billing_city']);
return$fields;
}
add_filter( 'woocommerce_checkout_fields', 'wc_ht_remove_checkout_field');

Remove shipping fields from WooCommerce checkout

functionwc_ht_remove_checkout_field( $fields) {
// remove shipping fields
unset($fields['shipping']['shipping_first_name']);
unset($fields['shipping']['shipping_last_name']);
unset($fields['shipping']['shipping_company']);
unset($fields['shipping']['shipping_address_1']);
unset($fields['shipping']['shipping_address_2']);
unset($fields['shipping']['shipping_city']);
unset($fields['shipping']['shipping_postcode']);
unset($fields['shipping']['shipping_country']);
unset($fields['shipping']['shipping_state']);
return$fields;
}
add_filter( 'woocommerce_checkout_fields', 'wc_ht_remove_checkout_field');