Questions tagged [sku]
Question related to Magento products' SKUs. It is an identification code that helps track the item for inventory.
273
questions
13
votes
9
answers
29k
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
7
answers
15k
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 ...
12
votes
4
answers
5k
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 ...
7
votes
3
answers
15k
views
What is the difference between Product ID and SKU?
What is the difference between Product ID and SKU in Magento 2?
6
votes
6
answers
17k
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 ...
6
votes
1
answer
2k
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)
...
6
votes
1
answer
3k
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?
6
votes
3
answers
7k
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-...
6
votes
1
answer
2k
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
4
answers
8k
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
2
answers
11k
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
1
answer
2k
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 ...
5
votes
2
answers
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
5
answers
6k
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 ...
4
votes
2
answers
5k
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 ...
4
votes
1
answer
8k
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
4
answers
2k
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
2
answers
18k
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 ...
4
votes
2
answers
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
1
answer
3k
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
2
answers
2k
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
2
answers
6k
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 ...
3
votes
4
answers
7k
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
2
answers
2k
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
3
votes
2
answers
2k
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 ...
3
votes
3
answers
702
views
Search by SKU in Magento not working properly
Over 3000 of our SKUs contain special characters such as "-", "/", "&". The problem is when we try to search regular SKU (e.g. ABC123) on the front end it returns the ...
3
votes
2
answers
7k
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, ...
3
votes
1
answer
1k
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
1
answer
41
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
3
answers
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
1
answer
129
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
1
answer
2k
views
Dynamically update SKU of configurable product
I have a configurable product with many options.
How can I update the sku based on selected options?
I have followed this answer, but I am stuck at the JavaScript part.
I try to get the this.config....
3
votes
0
answers
296
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
1
answer
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
3
answers
2k
views
How can I Get Sku In Products Ordered Reports
I want display sku at products ordered reports page, how can i get sku ?
2
votes
2
answers
468
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
2
answers
5k
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
1
answer
2k
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
3
answers
4k
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
2
answers
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
1
answer
2k
views
Following products with requested skus were not found:
I'm using Magento 2.4.3 and have sold an item, but when I go to ship it, I get this error
"Following products with requested skus were not found: Prod-P1234".
The product exists with that ...
2
votes
1
answer
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
4
answers
503
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
1
answer
790
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
1
answer
4k
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
2
answers
3k
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
2
answers
463
views
How to change the Product NAME and SKU permanently in quote_item table when it is added to cart?
How to do this? I am using checkout_cart_product_add_after event.
EDIT:
After I did it like this
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
2
votes
2
answers
1k
views
Can we show Sku in shopping cart in magento 2
I wan to display the sku in the shopping cart.
https://prnt.sc/lYQhd5uqcTo-
2
votes
2
answers
1k
views
Why my bundle products return a different SKU?
I'm getting the SKU from my Bundle product and the products associated too, but the result bellow showed up.
Bundle Product SKU: BundleQA-GT-5AHG30008P
Simple Product SKU: GT-5AHG30008P
It's ...
2
votes
2
answers
380
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?