Questions tagged [product]

Denotes a question related to the Magento products.

1,478 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
2answers
52 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 ...
2
votes
0answers
28 views

How to achieve single domain > multiple stores > different products and prices per store

I need to build out multiple Magento 'stores' on a single website, with each 'store' representing a unique partner who offers a different combination of products from our global catalog. For example,...
2
votes
0answers
20 views

Product feed with 2 Facebook Page

I have the Facebook Ads extension plugin with Magento. I already have it configured with one Facebook Page with the product feed. Is it possible to add another page and a second product feed? The two ...
2
votes
0answers
97 views

Run native csv import product magento 2, no way to set csv file in custom module

I followed steps in this topic Magento 2 run native product csv import programtically, but it didn't work. When I try to import product through a CSV file in back-office, the check data is correct and ...
2
votes
0answers
221 views

Setting custom product attribute value in magento 2

I have used below code to change the value of custom attribute when the product is viewed in admin. <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
0answers
95 views

Auto Add Product Attribute Options when Creating a new Product by Rest API

Is there a way to tell Magento 2 to: Send custom_attribute Label instead of Value; Auto create option in case the Label doesn't exist yet. I was able to do it with Magento 1 API, but I can't find a ...
2
votes
0answers
245 views

Magento2 character content other than whitespace is not allowed because the content type is 'element-only'

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'handle': Character content other than whitespace is not allowed because the content type is 'element-only'. ...
2
votes
0answers
101 views

Magento 2 : Product Table Name in Database

In my case, I created multiple users and created two or three products from each user from admin panel. So I want to know the name of the table in which username added with product??? please help....
2
votes
1answer
151 views

Custom attribut value don't save in editing product from back-end

I've had a custom select option in the product edit in the backend. When I try to save the product, my option is not saved. Here the code : di.xml <config xmlns:xsi="http://www.w3.org/2001/...
2
votes
3answers
81 views

How can I print a attribute on phtml?

I want show relation information from the products under the descriptions, this information shouldn't be inside a tab but as if it were a dynamic block, for example, each product will have a different ...
2
votes
0answers
16 views

How the personal center displays all the product information purchased

How to display all the product information purchased by the user. The product information includes (product name, rating, specification, order status, etc.)
2
votes
1answer
22 views

Magento product rendering

I have some doubts regarding product rendering.When we add a product from admin how it is displayed from frontend. What Magento does to make their product visible and distinguishable by their type ...
2
votes
0answers
45 views

Magento 1: How replacing WYSIWYG button in product description field?

By default when there is an attribute with "Enable WYSIWYG" set to Yes you will get a button bellow that form field [WYSIWYG Editor]. When you click on the button your will get a pop-up window, but ...
2
votes
2answers
157 views

Cannot open catalog edit/add product after enabling developer mode

I'm using magento version 2.2.5, after i enabled the developer mode, i always get an error while trying to edit one of my product or add new in back end: 1 exception(s): Exception #0 (Magento\...
2
votes
0answers
412 views

Create quote with product options programmatically

i created a product with customizable options like this: and i've successfully create a quote like this: $store = $this->storeManager->getStore(); $websiteId = $this->storeManager->...
2
votes
1answer
174 views

How to get category Id from order Item?

I want to get category Id from order Item. As we aware that we can get current_category on the product page. but how to get that category from orderItem object. We can get Product object via $...
2
votes
2answers
1k views

Magento 2 reindex gives error Duplicate entry

I am experiencing an issue which not sure why when I try to reindex it gives the error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4458-142-1-1293-4458' for key 'PRIMARY',...
2
votes
1answer
386 views

Magento 2: Product not showing in category page

I changed reindex mode Update by Schedule and add some product using custom script. But now when I run reindex command (CLI) then none of the products are showing into category page. Product is ...
2
votes
0answers
36 views

Product image import through csv throws required sku error

Ive multiple images for single product and Im trying to import it through csv as shown below. when I`m importing this csv file it gives me required sku error. So am i missing something here or my ...
2
votes
0answers
196 views

Magento 2: Remove price change from custom option dropdown in magento 2.2.3

Is there a way of removing the price change (e.g. the string '+$10.00' or '+$15.00') from after the option name in a custom option dropdown list? Any help would be much appreciated.
2
votes
0answers
41 views

Currency Converter

We have a problem in our webshop that the currencies switch with each other. The prices are Swedish Krona and Euro (we have two separate websites where the currencies are used). Only some products ...
2
votes
0answers
218 views

Magento 2 (2.2) add custom tab for simple product only in admin

I want to ceate new configuration tab under product edit form admin for simple product only and save data to custom table. I am using following scenario: 1- My/Module/view/adminhtml/ui_component/...
2
votes
0answers
14 views

How come for a batch of newly imported products the URL structure is different than our normal configuration?

I imported some 34 simple products to our admin store, base site, via MageBees' Import/Export Products extension, as I often do. The problem is that their URLs are rendering as default/catalog/product/...
2
votes
0answers
78 views

Magento 2 : Any Script or Extension to Attach Product Images to SKU

I am looking a script or extension to do this: I upload products via CSV, then run script or extension and attach product images (multiple) to the SKU, easy and fast and don't have to write in csv ...
2
votes
0answers
35 views

I got error when hit back button

When I open a specific product it loads fine, but if I hit the browser back button, I get an error. I have no idea why this happens or where start to check. This happens always after loading that ...
2
votes
0answers
568 views

Adding product form to different frontend page in Magento2

I've been working on this problem for a while and I'm not much closer to a proper solution for this. I'm at a stage where I think I can probably hack something together, but I feel there should be a ...
2
votes
1answer
383 views

Magento 2.2.1:- How to add text in between main image and thumbnail image

I tried to add text between main image and thumbnail image but i can not add image I also refer this link:- How add div after image block in Magento 2?
2
votes
0answers
3k views

Magento 2 Product import error :Value for 'status' attribute contains incorrect value, see acceptable values on settings specified for Admin in row

I am trying to import a csv of products having almost 6000 products. All the fields are validating correctly the only issue is with product_online i.e status attribute. If keep the product_online ...
2
votes
0answers
452 views

Magento 2 - Best approach to display and customize Recently Viewed Products with slider

Using our custom theme, we need to display Recently Viewed Products block on product detail page. We followed below approach Under Admin Panel we have Content -> Widgets Add Widget -> choose ...
2
votes
1answer
293 views

Magento2 downloadable product customoptions section position changing

can anyone help me to how to move customoptions section to below the product descriptions section. Please find the screenshot below: Thanks
2
votes
0answers
185 views

Show customer wishlist collection like in category view page

I want to show the customer wish list products to another customer with the layout like in category view page which include the layered navigation, toolbar option, and navigation page. Is there a ...
2
votes
0answers
129 views

Add video url in Import magento2

Is there any way to add video url in magento2 bulk import. if that is not possible how can i add product video programmatically in magento2
2
votes
0answers
108 views

How do I reinstall Magento 2.1, but keep all my CMS Pages, Blocks, Product Data?

I have built my entire site on a Magento 2.1.2 installation w/ sample data. Using an extension and some manual labor, I was able to delete most of the sample data (categories, pages, products), but ...
2
votes
0answers
196 views

Tier Price in configurable product

I have created a configurable product with two configurations. In each configuration, I have added Quantity and Tier price. Although the tier price does work, it does not show the tier price block ...
2
votes
2answers
1k views

Where does $product->getData('salable') come from?

I have a problem with one of the products. For some reason it doesn't display a buy button. I dig into the core and I figured it out that the problem with this value. Inside function isSalable() It ...
2
votes
0answers
132 views

Magento 1.9 Downloadable Product: Show download link except of add to cart in product view

I'm a little bit disappointed how the product type downloadable works in magento. I'm really wondering why you can buy a downloadable several times (i know you don't have to but it just looks like ...
2
votes
1answer
547 views

Add custom block to product page on 2columns-right In Magento 2

I have changed my page product layout to 2colums-right like this: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:...
2
votes
1answer
2k views

Magento 2 : set product image programatically

I want to upload a product along with product image, please suggest how to set path or upload image for a product. here is my code try{ $_product->setName($product["name"]); ...
2
votes
0answers
127 views

Load Product Image from Url

We have created the product programmatically and we want to use the image from external link instead of default magento way but we are unable to load the images from external link in magento2. Is ...
2
votes
1answer
344 views

How to build Magento 2 rest API for product info using SKU

i am learning Magento 2 but i don't know how to create API for product info and am getting error while trying This page contains the following errors: Error on line 2 at column 1: Extra content at ...
2
votes
2answers
829 views

Adding NOINDEX tag to products

We no longer have a web developer but need to add NOINDEX tags to all our products to help with our SEO We have about 450 products at any one time We are using Magento 1.8.1.0 We are complete ...
2
votes
0answers
385 views

Custom Option type file data not showing in Sales/Order Admin

I created a simple product with custom option type file like this : when i try to order this product at front end, there is input type file and i insert the file and click add to cart button, and ...
2
votes
0answers
508 views

Add product customizable option to product cart programatically Magento 2

I created a custom option in backend like this: I have a custom extension to call a controller which will add the product to cart programmatically like this: public function __construct( ...
2
votes
0answers
297 views

Magento 1.9: How to sort product list by alphabetically A ,B, C,D … to Z

How to sort product by alphabetically in product list page in magento 1.9 I want to display sorting like below image
2
votes
1answer
910 views

Add select quantity options on product page Magento 2

I want to change quantity textbox to quantity dropdown on product page. I found solutions that work for magento 1 not for magento 2. There is less information/doc about magento 2. It's being very ...
2
votes
1answer
201 views

Magento 2:Msrp in list page

I have extended the phtml file /vendor/magento/module-catalog/templates/product/price/amount/default.phtml`. I want to get the msrp price and attribute set id in the extended template in both list ...
2
votes
1answer
121 views

Magento 2 : Add Product functionality in frontend

Does anyone know about module availability/custom module implementation which allows me to add product same as admin panel from frontend, as i have a requirement to implement it in frontend as per the ...
2
votes
0answers
290 views

Magento API 2.1 catalogProductRepositoryV1 - cannot submit price

I am using magento 2.0 API catalogProductRepositoryV1 to POST my product to the magento. Below is my body. The problem that I am facing is that when I submit this product for the first time to create ...
2
votes
1answer
975 views

Magento 2 : Cart Total Not Updating

I added simple product with options programmatically into cart using this code. namespace Vendor\Extension\Controller\Customer; class Myclass extends \Magento\Framework\App\Action\Action { ...
2
votes
1answer
206 views

Magento : How Do I Loop Product Categories and Pull Out X Products From It

I have been bit of trouble trying to figure this out. Essentially on homepage I'm trying to to pull 3 products from 4 different categories. Category 1 - Product 1 - Product 2 - Product 3 ...