---
title: "Fix: Missing Products in UPS Module Settings for PrestaShop"
description: "In this tutorial: What is the error? What causes it? How to fix it UPS is one of the most recognized names in the shipping industry. They are also a very common choice when shipping products to your..."
url: https://www.inmotionhosting.com/support/edu/prestashop/ups-module-misssing-products/
date: 2014-05-02
modified: 2021-08-16
author: "Scott Mitchell"
categories: ["Prestashop"]
tags: ["Prestashop 1v.6"]
type: post
lang: en
---

# Fix: Missing Products in UPS Module Settings for PrestaShop

## In this tutorial:

[What is the error?](#what) [What causes it?](#cause) [How to fix it](#fix)

[UPS](https://www.ups.com) is one of the most recognized names in the shipping industry. They are also a very common choice when shipping products to your customers. PrestaShop has modules for UPS so that you can use them for your shipping needs. There seems to be an issue in the free UPS module (*upscarrier*, aka *Connect to UPS*) when configuring the module. The products are not always being listed in the *Product Settings* tab when configuring the modules. This article explains the issue and how to fix it for your PrestaShop store.

**NOTE:**

- The steps below are specifically presented for those with cPanel based webservers. As long as you can access your file structure, however, you can implement the actual fix.
- This fix works for both PrestaShop 1.5.x and 1.6.x versions.

## What is the exact error?

![](/support/images/stories/edu/ps16/errors/modules/upscarrier/missing-products/before.png)The drop-down menu in the *Product Settings* tab of the UPS module is supposed display products, but it is empty.

## What is causing the error?

The error is caused by an SQL [*SELECT* statement](https://dev.mysql.com/doc/refman/5.7/en/select.html) where the products are supposed to be pulled from the database to populate the dropdown. It actually finds the number of products and sets as many blank rows, so the data is coming back as [NULL](https://en.wikipedia.org/wiki/Null_%28SQL%29). When checking, we noticed that the limiting factor is the *id_lang* column setting. It is currently set to ‘*2*‘.

The test installation had only the default language of “*English*“. This is represented in the code by the variable “*lang_id*“. If only one language is loaded, then then “*lang_id*” would be equal to “*1*“. Replacing the hard set code of ‘*2*‘ with the dynamic code *$this->context->language* allows the proper language id to be used. This allows the dropdown to populate with the products.

## How to fix the missing products in the UPS product settings

1. [Log into your cPanel interface](https://www.inmotionhosting.com/support/edu/cpanel/how-to-log-into-cpanel/).
2. Use the [cPanel File Manager](https://www.inmotionhosting.com/support/edu/cpanel/using-file-manager-in-cpanel/) and navigate to your *modules/upscarrier* folder.
3. Locate the *upscarrier.php* file and [open it for editing](https://www.inmotionhosting.com/support/website/how-to-edit-a-file/). It is highly recommended you make a copy of the file before making any changes
4. Once inside, locate the line of code below. It should be line 1180. LEFT JOIN `’._DB_PREFIX_.’product_lang` pl ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = 2′.(version_compare(_PS_VERSION_, ‘1.5.0’) >= 0 ? ‘ ‘.$this->context->shop->addSqlRestrictionOnLang(‘pl’) : ”).’)
5. Replace the entire line of code with the following line: LEFT JOIN `’._DB_PREFIX_.’product_lang` pl ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = ‘.$this->context->language->id.(version_compare(_PS_VERSION_, ‘1.5.0’) >= 0 ? ‘ ‘.$this->context->shop->addSqlRestrictionOnLang(‘pl’) : ”).’)
6. Once you have replaced the line of code, click on the **Save Changes** button in the upper right corner to save it.

Now you can visit your ‘*Connect to UPS*‘ module and view the *Product Settings* tab; the products will display in the dropdown properly.

| Before | After |
| --- | --- |
| [![](/support/images/stories/edu/ps16/errors/modules/upscarrier/missing-products/before.png)](/support/images/stories/edu/ps16/errors/modules/upscarrier/missing-products/before.png) | [![](/support/images/stories/edu/ps16/errors/modules/upscarrier/missing-products/after.png)](/support/images/stories/edu/ps16/errors/modules/upscarrier/missing-products/after.png) |
