Questions tagged [product]

Denotes a question related to the Magento products.

1,378 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
38 views

Price always empty when create product programatically

I am trying to create the product programatically, like this: Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $data0['name'] = 'Gundamz'; $data0['sku'] = 'Gundamz123'; $...
3
votes
1answer
113 views

Magento: Product Details in popup

I want to show a product details in popup instead of redirecting to the product view page. How is it possible. Please help.
3
votes
0answers
122 views

Update product stock based on store id Magento 2

I have created a multi-store view for my Magento site. In my custom extension I've successfully load store id and product, now I want to update the product quantity for specific store id, is there a ...
3
votes
0answers
142 views

Add product stock information to product repository

When working with the ProductRepository in Magento 2 and the results of the getList method what is the "best" way to add extra information to the results? For example in the default 2.1.7 setup you ...
3
votes
1answer
2k views

Magento2 Product import (image filenames)

I'm not sure that this is a bug, as it's intentional from the looks of it, but ... I'm working on a migration from Zencart and the original site's media folder has been downloaded and we've written a ...
3
votes
1answer
1k views

Magento 2 - How to add dynamic-rows grid on catalog product

I am using Magento 2.1.5 I need to add dynamic rows grid on catalog product page I am using below di.xml for adding dynamic row on product_form app/code/vendor/module/etc/adminhtml/di.xml <...
3
votes
2answers
1k views

Add to Cart button in Magento 2.1

I tried with button add to cart and it not working, app/code/Moo/Custom/view/product.phtml <?php $product = $this->getData('product'); $postDataHelper = $this->helper('Magento\Framework\...
3
votes
2answers
1k views

Magento 2 - Remove video from gallery in product page

I'm trying to remove the video from the gallery in product page and I saw that the method getGalleryImages() in the Magento\Catalog\Block\Product\View\Gallery block gets all types of media (image and ...
3
votes
0answers
149 views

Simple product image in search results

I'm currently in the process of setting up a Magento store-front (v1.9). Our products are set up as configurable products. We have an image for the configurable products and an image for each simple ...
3
votes
0answers
371 views

Magento 2.0.7 Product import inserts duplicate entry of stock item

I am using the FireGento_FastSimpleImport2 module to import simple products into my store using the command line. This module passes the array to Magento's core import models. I am facing some issues ...
3
votes
0answers
203 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 ...
3
votes
0answers
36 views

Adding new products to a store with a template, without changing other products in the store

I have recently taken over a store at work that I did not build, nor do I have enough experience with Magento to be truly confident yet. I have a .csv product template, to add 195 new products to a ...
3
votes
1answer
161 views

toolbar sortby price in custom phtml

I have created a custom module. The custom.phtml file lists all the products of a category and subcategory. I want to place toolbar with sort by price on the top of the category. I have included the ...
3
votes
1answer
605 views

Magento 2 REST API Authorization failed while creating product

I am trying to create a simple product using REST Api. The client is a node.js script, I have created an admin user with access to all the resources, and used the credentials to request a token which ...
3
votes
0answers
380 views

Magento import bulk products

I am trying to import bulk products in magento using System -> Import/Export -> Dataflow – Profiles -> Import All Products and after uploading .csv file and clicking on run profile in popup i get a ...
3
votes
2answers
987 views

Custom Attribute in Layered Navigation

I have a custom attribute called m2_price, which is the Metre Squared price of a piece of carpet. I've enabled it to be filterable with results in the layered navigation and this all works fine. ...
3
votes
1answer
2k views

Edit New and Sale labels on products

I am really struggling to find the file I need to edit to change the text for new and sale labels on products. I'm referring to the labels that appear on products when you set the new date range or ...
2
votes
3answers
28 views

Magento 2 Create A custom grid for product using Ui component

I want to create a gird using the UI component in Magento. The grid must have product id and product SKU. I tried using the below code but it's not working. Here is the below code to create the grid. ...
2
votes
0answers
34 views

Magento 2 Can We override **Add New Product** Page ? in custom_module on frontend area?

I want to make a custom page where vendor can add New Product with all text fields which Magento provide from the backend. I want to override this same page on my custom module on the frontend side. ...
2
votes
1answer
23 views

Create Update product REST API magento2.1

I got below error on my rest API on magento2.1 { "message": "%fieldName is a required field.", "parameters": { "fieldName": "product" } } My URL is: https://XXX/rest/all/V1/...
2
votes
1answer
68 views

Product image going to the wrong URL

I have this block at the bottom of cms pages that are created by bluefoot and when you click on the image it takes you to a long URL like if it was being searched for but if you click on "add to cart" ...
2
votes
0answers
19 views

Magento Change Product View Url Multiple Website Wise

I have created multiple websites in Magento, and my website's homepages are working fine but When i am trying to view the product from the second website than product redirect to the first website(...
2
votes
0answers
22 views

Magento 1.9.4.1 logged in customer can not show product page, it is showing 404

I have upgrade magento 1.9.4.1 from Magento 1.9.1.0 now a guest customer can visit the product page, but when the logged-in customer visit the product page it is showing the error as below: "...
2
votes
0answers
21 views

Magento2 URL key for specified store already exists. while creating product

I'm creating products using scripts. Product data came from json file. Problem is I'm getting error URL key for specified store already exists. ,when second product has same name but different sku. So,...
2
votes
1answer
34 views

In Magento 1 if i try to delete over 50 products the site crashes

Is there anyway to solve this rather annoying issue?
2
votes
0answers
24 views

Add Product to cart with required Options is impossible

I added a required customizable option (not sure about the name in English, in French, it's "Option personalisable"). On the front, there is no problem until you try to add the product to the cart. ...
2
votes
0answers
23 views

Magento 2 REST API: Show In-stock products first in product listing API

I am looking into a headless magento approach. I am using the following API to list the products in a given category: V1/products?searchCriteria[filter_groups][0][filters][0][field]=category_id&...
2
votes
0answers
19 views

Magento 1.x - Ajax auto choose product

I want after I have pasted sku or name product into the input seach, it will automatically check and notify. I am currently using autoComplete jQuery. But the problem is that if it doesn't show drop ...
2
votes
0answers
16 views

Magento2: How to implement simple Ajax demo for Product Collection?

I want to display product using ajax method on button click same page. How is it possible in Magento?
2
votes
0answers
37 views

Magento 2: Use Categories Path for Product URLs is not working

I have two products having the same attributes as categories, attribute set, etc. And I have set Use Categories Path for Product URLs as NO but still, one product has the category in URL another don't ...
2
votes
0answers
15 views

Product page count and record count issue on listing page

Unable to change the record on listing page it shows static number for all listing page as shown in the image It display 10000 for all listing page using $this->_productCollection()->getSize() ...
2
votes
1answer
46 views

How to load current product in Magento 2 without using deprecated functionality?

The core uses two deprecated classes to load the current product within the block class on the front end: \Magento\Catalog\Block\Product\AbstractProduct \Magento\Framework\Registry See: \Magento\...
2
votes
1answer
158 views

Invalid argument supplied for foreach() Error in magento 2.3

I am getting this error on some Products on Magento 2.3 when I try to view them: 1 exception(s): Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in /www/htdocs/...
2
votes
0answers
50 views

Magento2 - Indexing / Full page cache problems

We are having long-term problems with indexer and cache settings. After reading great guide by @johnhughes1984 about caching and indexing we thought that everything will be alright with settings ...
2
votes
2answers
135 views

How to set the category ids to a products from category path?

I want to progrmmatically create products from a xml. Ex : I am getting the product categories as like below. Default Category/Beer , Default Category/Beer /CRAFT, Default Category/Beer /CRAFT/...
2
votes
0answers
16 views

Product pages open with errors

I don't know if it is the reason to introduce custom CSS. Now my website opens some product pages, which prompts the following error. But some product pages are open normal. How can I solve it?
2
votes
1answer
320 views

magento 2 Uncaught TypeError: Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel() must be of the type string

In custom theme And category page show this error- Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel() must be of the type string, null given, ...
2
votes
0answers
19 views

Magento 2: How can I modify the product edit page depending on my custom product types

Is it posible to hide/remove default fields and fieldsets from the product edit page for custom product types? For example weight, price, tax_class...
2
votes
1answer
21 views

Can an Attribute be used more than once in an attribute set?

How to reuse an attribute in the same set? I have a product that has multiple items and I'd like to use "description" (attribute) several times.
2
votes
0answers
26 views

Magento 2 : Product list only shows one product in one of the category, the rest works fine

Product list only shows one product in one of the category, the rest works fine. That category has more products, if you search for a product, you can access its product view and in related products ...
2
votes
0answers
32 views

Magento 2 admin product custom option page add customer group dropdown

I want to add customer group dropdown on product custom option page. the reason behind is to show the custom option based on the customer group in front-end. how can i achieve the above functionality....
2
votes
0answers
19 views

Create advanced shopping cart rule in Magento 2

I want to create a shopping cart rule in Magento 2. I have 6 products (range product A -> product F) to keep it simple. Those products cannot be ordered without a valid discount code. if cart has one ...
2
votes
0answers
67 views

Update select attribute in custom_attributes via catalogProductRepositoryV1 API PUT request

I'm trying to update a product with the catalogProductRepositoryV1. I want to change a custom select attribute for the given product. When sending the following request: { "product": { "...
2
votes
1answer
12 views

Call for Stock option

The nature of the business we have is that stock is sometimes not kept on site and can be ordered in for next day, however we operate in a way that means our website displays as out of stock. Is there ...
2
votes
0answers
25 views

Apply product offer when subtotal grater or equal 1000 only for specific date

I want to add new product offer when cart subtotal >= 1000 This offer valid only for every month between day 1 to 7 (1-m-yyyy to 7-m-yyyy). Therefore i used below event - <event name="...
2
votes
0answers
180 views

Magento 2 Limit Product quantity per customer

In my magento store there are virtual subscription products which come as trials. I need to set maximum 1 product which is allowed to purchase by a customer. Does any one knows what is the ...
2
votes
1answer
110 views

product displayed in one column only instead of 2 column on phone in magento 2.3

when you view a category on desktop shows 3 column but on mobile phone it shows product only one column instead of two column of the page. whats wrong with magento 2.3.0 check the link on mobile ...
2
votes
1answer
50 views

Add product custom attribute to order export?

Anyone has any clue on how to add custom product attribute to order export? Cant realy show any code, cause I have only been googling so far, as I have no clue on how to handle something like this. ...
2
votes
0answers
137 views

How to get final price of a product by rest API?

I mean the final price that Magento calculated and inserted in catalog_product_index_price table. It may have applied special price/catalog price rule/tier price, which price is displayed to customer ...
2
votes
2answers
48 views

Get product, with 0 quantity, by attribute (sku)

I'm importing products and I want to get product by its sku. This is the code: $product = $this->productFactory->create(); $record = $product->loadByAttribute('sku', '1234'); It works but ...