Questions tagged [create-product]

Denotes questions related to creating a product in magento

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
233 views

Magento REST API Cannot add products (Nonce and Invalid attribute SKU)

I'm new to Magento REST APIs. I've been trying to POST a product to my Magento store through Postman. OAuth 1.0 is authorized and I've checked it by updating a product and getting product details ...
1
vote
2answers
38 views

Magento 2: Create product using rest API image upload not working

I have creating product using rest API but image upload not working. API: baseurl/rest/V1/products Method: POST Body: { "product": { "sku": "info", "name&...
1
vote
0answers
648 views

Add custom attributes when creating product via REST API

I am attempting to set custom attributes when creating a new product via the REST API. The products have a required attribute hpUuid. This is part of my JSON file to create the new product: { "...
1
vote
1answer
29 views

Magento2.3.0 Categories - I wish the products which are in child category will be visible in each parent category by default

I am using in Magento2.3.0 when i create product in admin side i need to Categories - I wish the products which are in child category will be visible in each parent category by default. adding the ...
1
vote
1answer
1k views

Magento 2 : When creating a product - Cannot add or update a child row: a foreign key constraint fails?

When creating a product, it throws this error SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`vbm`.`catalog_product_entity`, ...
1
vote
1answer
333 views

Add stock data on product programatically in Magento 2

I want to add stock data on a product but it doesn't work. In my function, I have a product created by : $product = $objectManager->create('Magento\Catalog\Model\Product'); Then, I set some data ...
1
vote
0answers
279 views

Magento2 create downloadable product into an iteration

i am trying to create downloadable products programmatically. The product data are saved into a xml file. The downloadable data are PDFs and not URLs. When only one xml file is into the data folder, ...
1
vote
1answer
135 views

Magento2: Product created from front-end is not adding to cart,it results “We can't add this item to your shopping cart right now.”

However the sample products are adding in cart,this is problem with products that has been added programmatically. Below is the code I am using to create the product programmatically. $objectManager =...
0
votes
0answers
66 views

Magento 2: How to pass “form data” Rest API in create product postman

I have created product api and passed form-data in postman but i have faced issue in pass category_ids and image. Any have idea how to pass category_ids and image in postman while creating product API....
0
votes
0answers
14 views

Product created with SOAP API missing attributes

I'm trying to create a product using /api/soap_v2 from my C# project. The product gets created, but is missing some of the additional_attributes that I specified. Some work ("data_status", "...
0
votes
2answers
56 views

Magento 2 : Unable to generate Price for programmatically created 'custom product'

I have created a custom product for which I am able programmatically create products. The problem is that i am unable to generate a price for these products. the field is left blank when the product ...
0
votes
0answers
43 views

Cannot see products on homepage

I did the following: Logged into Admin Created a simple product Added a product list widget to the home page Reloaded cache ... And I cannot see my product displayed on the homepage.
0
votes
1answer
80 views

$product->save() taking 4 seconds to save one simple product in magento 2.1.3

I have below code with Image Upload which is working fine...but it takes 4 seconds to save one simple product....my store have more than 25000 products. It takes more than 4/5 hrs to create/update the ...
0
votes
0answers
192 views

Create virtual product with custom options and dynamic price programmatically

How to create a virtual product programmatically and add custom option to it? And how to set the product price dynamic ?
0
votes
1answer
250 views

add product programmatically magento 2: Undefined property: stdClass::$reference

I went to the backend of magento I added a reference attribute for product, then I executed the script Programmatically to add product I put: $_product->setName($product_data->_source->name);...