Questions tagged [sku]

Question related to Magento products' SKUs. It is an identification code that helps track the item for inventory.

Filter by
Sorted by
Tagged with
12
votes
6answers
24k views

Delete multiple products in Magento

Is there any way to delete multiple products by filtering with SKU? I have around 1000 products that I want to delete.
12
votes
4answers
3k views

How to remove a duplicate sku via database?

I get this error when attempting to edit and save a few of my Magento products via admin: "The value of attribute "SKU" must be unique." When I view my products in Magento admin a duplicate sku is ...
8
votes
7answers
10k views

Magento 2 - Why do SKU not change dynamically in configurable product view page

When you change an attribute in a configurable product the product image changes dynamically but the SKU doesn't change. Also, if you add a configured product to your basket it gives you the image of ...
6
votes
3answers
7k views

What is the difference between Product ID and SKU?

What is the difference between Product ID and SKU in Magento 2?
6
votes
1answer
1k views

How to get the product id and SKU code of the product selected

I am using a plugin to enable notify me (Out of stock) feature, the plugin is working properly but the problem is it is taking the core product id and storing it in the backend, even after I select a ...
5
votes
4answers
7k views

Magento - Display SKU on Category Page

I would like to display the product SKU on the category pages. I managed to plant it in the short description on every product page using: <div class="std"> <h5><?php echo $this-...
5
votes
3answers
8k views

Magento 2 - get special price of product by product id or sku

I need to get the special price of a product by product Id or Sku. Let's say I have an existing product with Id '21' and Sku 'test-21'. This information is provided in my custom block class, how can ...
5
votes
2answers
10k views

Display simple product SKU for configurable products

How can I include the simple product sku to display for configurable products which have more than two or more drop down options ( two or more attributes)? I would like the SKU to display after all ...
5
votes
1answer
2k views

Which characters are allowed (by default) in a SKU?

A simple question with no hits on Google. What are the characters that are allowed in a SKU? The entire UTF-8 character set?
5
votes
1answer
652 views

Magento 2 REST - SKU to items on cart totals API response is not available, How to get SKU in response API

Magento 2 Rest API of cart totals doesn't provide SKU, Which is necessary for any operation like extension_attributes /rest/V1/carts/mine/totals The return array of Items is array (size=21) ...
5
votes
2answers
1k views

Getting SQLSTATE[HY000]: General error

I'm running CE 1.9 on a VPS. Have a problem with the category, which contains more than 350'000 SKUs. When I try to open this category in the backend, nothing happens, so I cannot edit any category ...
4
votes
1answer
6k views

Magento 2.1 Update Product Stock in Cron Job

I need to be able to programmatically update product stock in my Cron job. I have an array that contains both the SKU of the product needing updating and the Stock value of that product. How can I ...
4
votes
4answers
919 views

How to get product images based on its sku?

I implemented a custom module Company/Module. In the controller folder i have upload.php file. I need to modify this file to display the output in a tabular form with sku and product image. Please ...
4
votes
2answers
3k views

Magento import error

I am importing a large csv file(about 5.5 MB). Whenever I try to import it gives error Product with specified super products SKU not found in rows I have googled this issue and found that it is ...
4
votes
1answer
2k views

Error Duplicating Product Magento 2.1.2?

After updating my Magento installation from 2.0.x to 2.1.2 I cannot duplicate products. Suppose I try to duplicate a product with SKU number '10', duplication then yields the following error: ...
4
votes
1answer
1k views

Safely update SKU from DB Magento2

In a store of mine, built on Magento 2.1.x I need to perform a bulk update on product SKUs. I am thinking about doing an UPDATE directly on the DB, on the catalog_product_entity table, since I ...
4
votes
3answers
5k views

How to get specific sku product on search in magento 2?

In search bar when i am searching a product using sku (MY-PRODUCT-101), It displays all the product whose sku is having prefix (MY-PRODUCT-XXX) , But i only want it to fetch whose sku is (MY-...
4
votes
2answers
1k views

Magento2 - Filter product collection by SKU is not affecting layer navigation

I am filtering the product collection in ListProduct.php using below code // Sample sku array $skuarray=array('sku1', 'sku2', 'sku3'); $this->_productCollection = $layer->getProductCollection()...
3
votes
5answers
2k views

How to get Magento2 product with REST if sku has slash?

Does anyone have an idea about how to get a product with slash through the rest api ? I have a product with sku 100/1. The closest I have gotten is to call: get /rest/V1/products/100%252f1 But it ...
3
votes
3answers
4k views

SQL Query to fetch all child SKUs by using the configurable SKU

I am trying to create a SQL query that will display all the SKUs of a simple product that are related to a configurable product. I will add the configurable SKU via a form field that I want to query. ...
3
votes
2answers
15k views

Why SKU's need to be unique for each product, don't we have product id for that?

Question : How product nos/item number/part number different from SKU? From what I understand, SKU groups all the attributes that applies to a product and assigns a fixed number/value to it so that ...
3
votes
1answer
939 views

How can we display SKU in URL structure?

How can we display SKU in URL structure? e.g domain/Product name kws/industry/SKU-product type. I'm also using SKU auto generator to generate SKU's.
3
votes
1answer
37 views

Numeric SKUs being rounded frontend

Odd one, we have an SKU that is 063.665. Frontend however under additional information it shows as 63.67. So it strips the leading 0 and rounds the end. Does anyone know how I can stop this ...
3
votes
3answers
6k views

different inventory levels for same SKU multi store

We have a Canadian website and a US website. All products are shared. But we have two warehouses, one in each country. Therefore we need different stock levels for our websites. Any ideas?
3
votes
1answer
126 views

I want some extra fields on magento 2.1.2 api

What I get : http://example.com/index.php/rest/V1/categories/263/products [{ "sku": "20130", "position": 1, "category_id": "263" }, { "sku": "20134",...
3
votes
0answers
246 views

Unique SKU for Product entity (Mage2)

Why SKU field in product table (catalog_product_entity.sku - VARCHAR(64)) does not have UNIQUE index (just simple INDEX for searching) and uniqueness is provided by PHP code? Postfix "-1" is added ...
2
votes
1answer
5k views

Check if SKU exists

I'm logging a bunch of stuff in our database. Is there a quick and easy way to check if a SKU exists or not? This way I can remove anything malformed from our import process.
2
votes
2answers
4k views

Can't see SKU as an option on shopping cart price rules

We're new to Magento community and I'm trying to set up a shopping cart price rule offer on a single product however I want to set it against a single SKU. When I click in the dropdown for conditions ...
2
votes
2answers
162 views

Load Product Qty by sku in Magento 2 Controller

public function execute() { // Product Colletion $collection = $this->_productCollectionFactory->create(); $collection->addAttributeToSelect(['name', 'special_price', 'entity_id']...
2
votes
2answers
4k views

Update product sku with customs options skus on product pages and cart

How can I dynamically update the sku of a product on the product page when users select its custom options? Also, how could it then be passed into the cart page? Example: A product with sku XXX has ...
2
votes
2answers
2k views

update Sku in using catalog_product_save_after in magento 2

I try set new sku using catalog_product_save_after event, its continuously run this observer, But Not save the sku value. events.xml: <event name="catalog_product_save_after"> <observer ...
2
votes
2answers
4k views

Get flat product table name

First, I wanted to ask for the fastest way to get a list of all existing SKUs in the shop (Magento 1.9.0.1), but while writing the post, I already managed to write a good deal of the solution. This is ...
2
votes
2answers
1k views

increase length of sku in magento 2

We use magento 2.2.2 and we need a longer SKU. We set "const SKU_MAX_LENGTH = 255;" in the file module-catalog/Model/Product/Attribute/Backend/Sku.php but it does not work
2
votes
3answers
3k views

How to create coupon for specific SKU

Magento 1.xx can easily make a coupon for specific SKU, why the SKU disappear on Magento 2.xx
2
votes
1answer
3k views

How to get all product SKUs in foreach loop on checkout success page?

I am trying to add some tracking and conversion codes which require all skus from an order to be listed in the HTML tag on the checkout success page. So far I have been able to get the QTY, Order ...
2
votes
4answers
307 views

Is it possible to insert a prefix in front of existing SKU's?

We are looking to insert 2 digits in front of all of our SKU's to help make them more unique and to make them differ from everyone else's who sell the same product. Is it possible using SQL to perform ...
2
votes
1answer
1k views

Magento 2.2 How to add product sku to order confirmation email?

I am working on a new site using Magento 2.2. This is my first project using Magento 2. Can anyone guide me how to add the product SKU to the order confirmation email? When I go to Backend -> ...
2
votes
2answers
1k views

How to display the sku of product in javascript?

When the below line is used in JavaScript it displays the Product Id: var productId = optionsPrice.productId; window.alert(productId); Similarly how to get & display sku of the configurable ...
2
votes
1answer
3k views

Get sku of selected custom option

I want SKU value of product's selected custom option on onepage. Can somebody help me on this ? Thank you.
2
votes
1answer
6k views

What is sku? Should I use it?

Can I defined SKU in this way: let's say I got a lot of M&M chocolates products, all the same chocolates product, and they got different bar code. Can I say that the sku works like the bar code, ...
2
votes
2answers
2k views

Adding a Product to the Cart via Querystring using SKU

I know that we can adding a product to cart via querystring. but how do we add sku to cart via querystring in url without including product id like this : domain/checkout/cart/add?sku=ABC or domain/...
2
votes
1answer
265 views

How to remove SKU column from order details in My account page

I wish to remove SKU from order details. Open my account page in frontend 2.Go to My Orders 3.Click View Orders link from the list of orders How to remove the SKU colum and its associated details. ...
2
votes
2answers
116 views

Auto generate SKU for products that do not have one in Magento 1.9

Is it possible to generate skus for all products that do not have already one?
2
votes
1answer
595 views

SKU non-Default label is not reflected on the frontend in Magento 2

I am trying to change the SKU attribute label from "SKU" to "Item" on the Product Page on the storefront by adding a label to the attribute in Admin Panel by going to Stores > Attributes > Product ...
2
votes
2answers
214 views

One product with more SKUs depending on colour choices

Help with this one guys... I'm using Magento 1.9.3.0 - I have one product that has two different product codes depending on panel finish (M - magnolia and W - white) but also adds two letters of ...
2
votes
3answers
68 views

How to export all customers based on ordered items SKU?

How to find all customers who ordered a certain SKU ?
2
votes
1answer
140 views

Call the product to the home page using a SKU or ID Magento 2

I'm trying to develop an extension. I want to select a product SKU in the admin to be able to display the product on the home page. app\code\My\Mpanel\etc\adminhtml\system.xml app\design\frontend\...
2
votes
2answers
800 views

Product collection sort order by custom skus string, when the sku has a hyphen in it, it will result a error

Product collection sort order by skus could use $collection->getSelect()->order(new /Zend_Db_Expr("FIELD(e.sku, $skus)")); (Magento 2: Order product collection by the order string(skus, ids etc) ...
2
votes
1answer
147 views

Can't send sku on contact form

My intention is to send the sku as a hidden variable when applying for the contact form but only after having visited a product. It works fine with localhost, where the cache is disabled, but not ...
2
votes
1answer
306 views

How to modify search so when input “GM321” it shows the “GM-321” sku number?

Currently if the customer search by SKU, he need to enter the precise part number. For example, for part number DMS-212, customer must search DMS-212, if he input DMS212, search doesn't work. Is there ...

1
2 3 4 5