Questions tagged [products]

Questions about products in the Magento catalog in general

Filter by
Sorted by
Tagged with
1
vote
2answers
35 views

How do I get all products that are displayed on a page?

I am trying to get all the products which are displayed on the current page. The information is used for tracking cookies on the page.ready call. It was possible to get the product from the product ...
0
votes
0answers
11 views

I can't associate simple products to configurable ones if they have 0 quantity

I use the following code to associate (I call it from a loop) simple products to a configurable one. it works fine except if the id of the product correspont to a product with 0 quantities, in which ...
0
votes
0answers
12 views

Adding a suffix/unique URL for bundled products

I currently have bundled products that are broken down by size. For example, Grey T Shirt (Bundle) Small T Shirt Medium T Shirt Large T Shirt Currently the url is example.com/greytshirt Is there a ...
0
votes
1answer
20 views

Magento 2: Error on reindex

I have recently upgrade my instance from Magento 2.3.0 to 2.4.3 and products are not showing on the frontend. When I run php bin/magento indexer:reindex command I get this error: Any help will be ...
0
votes
2answers
24 views

frontend error category products not getting displayed

I am trying to access the product listing on the frontend But I am getting this error. Parse error: syntax error, unexpected 'else' (T_ELSE) in C:\xampp\htdocs\testmastersdirect\mastersdirect.masters-...
0
votes
1answer
19 views

Custom Model not updating in catalog_product_save_after event

I ran into weird issue. I am trying to update my custom model/table in catalog_product_save_after event but it always creates new entry in the DB instead of updating older one. I'm doing this way : ...
0
votes
0answers
10 views

Magento 2 - Aftert importing products with CSV number of products imported is wrong

I have imported products via CSV file upload using Magento 2 import. In total I have imported 50401 products. I have a problem, the number of imported products is not equal to the number of found ...
0
votes
0answers
18 views

Added product not visible, After double save of same product it visible

I and my team member added lots of product from the admin panel but some of them is not visible. But when we go to edit and re-save a particular product individually without changing anything then it ...
0
votes
2answers
13 views

Increase the width of the product table in the order confirmation template

I'm trying to help my friend out who has a Magento Store, (2.3.6). I'm a little new to Magento but am experienced with PHP, HTML, CSS. Order confirmation emails are coming through badly formatted and ...
0
votes
1answer
14 views

Product Catalog Images URL construction

I have a rather strange issue on Magento 2 (2.3.3) where product images are not loading. Grid and List view show an error 500 for (some) product images, which seem to have additional slugs versus what ...
0
votes
0answers
17 views

Combination of grouped or bundled product with simple products

I'm trying to create a product which makes perfect sense to me, but can't get it to work: Customer would be able to select a kit of two products OR one of the two separate items either by a simple ...
0
votes
0answers
9 views

Magento 2 Add Button in Edit Product page and land back there after POST request

So, as the title says, I want to add an Admin button in the Edit Product Admin page. That button, when pressed, will call the respective controller of a URL, sending along the product id, the ...
0
votes
1answer
32 views

How to get ordered products withing a date range in magento 2 programmatically?

I want to get the products ordered within a date range for a report. As the result, I need like, product, product type, product Qty. I tried to load all orders and get the sum of products, it want ...
0
votes
0answers
14 views

How can I set a product downloadable but optionally shippable?

I run a Magento 2.4.2 store which contains only downloadable products but those products could be (with a extra charge) shippable. What's the easy way to set them? Should I insert a downloadable ...
0
votes
3answers
49 views

Magento 2: existing products doesn't load regular price through a cron job

Everything was work fine. But now from cron doesn't load productFactory right! Can somebody please help me? public function __construct( Context $context, \Magento\Checkout\Model\Session $...
0
votes
0answers
27 views

What is the correct way to configure Magento, so that products will be visible on storefront?

I am completely new to magento. Trying to add some products on store, product saved successfully. But it is not visible on storefront. Checked all the configuration settings, all are correct. I found ...
0
votes
0answers
11 views

Is it possible to make the magento filter load a phtml code inside?

Staff in magento 2, in 2-column layout, in the first column there is a value filter and in the second column the products. Is it possible to make the filter load inside the product column?. I need the ...
0
votes
0answers
12 views

Set Product Image From Image Gallery

Is there any way to get an image for a new product direct from image gallery? i want to categorize photos into folders on image gallery and then putting them into the products. My Magento version is 2....
0
votes
1answer
33 views

Magento 2 REST APIs fetch results by store code

When i am trying to fetch the orders, & customers & products collection by using store code I am getting another store results aswell. Did any one facing the issue in the magento 2.4 version? ...
0
votes
0answers
19 views

Magento 2.3: products are out of stock only on the product details page

I have a multistore site with simple products that appear to have positive quantities from the backend and are set as "available" in stock. I've checked and I'm sure all other store views ...
0
votes
0answers
32 views

Magento 2.4 stock_item in /v1/products API

The stock_item seems deprecated in the Magento /V1/products endpoint there is some mentioned here: Magento 2: Get Product Stock status details in Rest API Magento 2: Rest API add "stock_item"...
0
votes
1answer
29 views

Magento 2: Export All Products with their custom options

I want to export all products with their custom options through database.
0
votes
1answer
32 views

Magento 2 | Exclude duplicate Item ID from a collection before foreach

When I foreach my collection filtered by tier price, qty and customer group I get the error: "Item (Magento \ Catalog \ Model \ Product \ Interceptor) with the same ID already exists". This ...
0
votes
1answer
85 views

Magento 2 | Item with the same ID already exists when join tables

In my class I have filtered my collection by tier price and quantity. If I put the display of only 3 products the code works, while if I set the display for all products I get this problem: Item (...
0
votes
1answer
19 views

How to create a block with random products and style grid?

I'm starting to play with magento 2 and wanted to create a list of 10 random products that I can place anywhere (e.g. home) with a grid style. May I know, How I can get 10 random products, but I don't ...
0
votes
0answers
19 views

Magento 2, programmatically create configurable products

Hello I have the necessity of creating both simpe and configurable products. This is what (following online guidelines) I have right now: $bootstrap = Bootstrap::create(BP, $params); $objectManager = $...
0
votes
1answer
11 views

Magento 2: Product status doesn't change after changing to another status

When I changed the status of the product from visible to invisible and when I view the product (in the admin panel) it displays correctly but on the table shows the preview status (see attached ). and ...
0
votes
0answers
19 views

Magento 2 Cross Sell products layout are breaking in shopping cart page even in default Theme

We are facing a issue with the Cross Sell products layout in shopping cart page. The product items that are rendered are not loading in proper HTML structure and resulting the items layout to beak. ...
0
votes
1answer
50 views

Magento 2.4.2 stock wrong on productpage

I have installed magento 2.4.2 community edition as multistore. The configurable products are uploaded with a csv from the supplier. On the page with all products I get the right message that the ...
0
votes
1answer
21 views

Load products for specific store Magento 2

$products = $this->productFactory->create() ->setStoreId($store_id) //this is not working ->getCollection() ...
0
votes
1answer
19 views

How can Enable Product (a [website] scope property) can have different values in one specific store view vs All Store?

I have 1 website, 1 store and 2 store views (for English and Finnish languages.), If "Enable product" scope is website. Then how come it can have different values between these Scope: ...
1
vote
1answer
23 views

what is the table of products in magento 2?

I want to know what is the table in the magento 2 database, which stores the product information as the description. I found a table called "quote_item" but there are a lot less products ...
1
vote
1answer
102 views

Fetching SKUs containing a "/" (forward slash character) from the /rest/v1/products/ REST API endpoint?

A lot of our SKUs have spaces and forward slashes in them (eg: "PRODUCT1-DARK BLUE" and "PRODUCT2-DARK/RED". I'm able to curl to the products with spaces via url encoding:     # ...
0
votes
1answer
42 views

Magento 2.3.3 Hide product that are missing product image

Im using Magento2 v2.3.3 Open source. My store consist of around 76000 products and some of them are missing product images. Is it possible without much coding to hide products on the frontend that ...
0
votes
3answers
82 views

Magento 2 certain products hide out of stock products at storefront

I wanted to show all out of products at front store, so I went Store> Configuration > Catalog > Inventory and set yes Display Out of Stock Products option But I have to hide certain out of ...
1
vote
1answer
293 views

Magento 2: Videos not working in Product gallery

Video at product gallery inside product detail page is not working, However, it is working from admin panel but on product view it is showing only video thumbnail. Video is not playing while clicking ...
0
votes
0answers
10 views

Magento 2.3 - Customer Login custom product view

We have a customer who asked that when a customer log's into their account, they can only see the products they have been allocated. Our customer is selling a type of products to different stores. And ...
0
votes
1answer
57 views

Optimize Product Collection Filter

I have a Model in my code that creates a custom product collection based on a user search term. That search term should search products and filter it by sku or name... The issue is that it takes too ...
0
votes
2answers
88 views

Products are disappeared on the frontend. All show up after reindex manually. - Magento 2

All products are disappeared on the frontend. All show up again after reindex all php bin/magento indexer:reindex After a few hours later, all products are disappeared again on categories and search ...
0
votes
0answers
21 views

Infinite scroll is loading once all products are loaded

I want to make infinite scroll to load even if not all products are loaded templates for infinite scroll here is the code : <?php if($block->isEnabled()): ?> <div class="...
0
votes
0answers
36 views

Shopify to Magento 2 products csv converter

I want to migrate my products from shopify to magento. Is there any code present on github or any other software for this? I don't need to go for paid extensions. Need some script to convert ...
0
votes
0answers
14 views

Add attribute to bundle pre order product

I have a pre order extension that gives me an attribute "Preorder Product Availability" that responsible for the time date of Availability of the products , and I have bundle products. Then ...
1
vote
2answers
53 views

Magento 2 - Change amount of products per row in category view

Currently there are showing 4 products per row in the category view. How can I make it show 3 products per row instead? I found this answer. It says there is a file Magento_Catalog\web\css\source\...
0
votes
0answers
19 views

New products take 12 plus hours to appear in categories

We are currently using Magento 2.4.1 . When we add new products it takes hours to show in the categories we had picked when creating the product and yet if you search the product on the website it ...
0
votes
1answer
84 views

Set product in shared Catalog

For product import, I have checked from admin (admin -> catalog -> shared catalog ) that my id for shared catalog (Default (General)) is 1. Then I done code as below. but not works. please guide ...
0
votes
1answer
86 views

M2.4 - How to add OG tag for categories?

I am created OG tag for the Homepage and products, For Homepage : 1)app/design/frontend/Zero/my_theme/Magento_theme/layout/default_head_blocks.xml <meta name="og:title" content="...
0
votes
0answers
266 views

I have error Call to a member function getData() on null l/vendor/magento/module-catalog/Helper/Image.php:501 in supro theme

I have error main.CRITICAL: Error: Call to a member function getData() on null in /home/bigroadusa/web/bigroadusa.com/public_html/vendor/magento/module-catalog/Helper/Image.php:501 in debug and system ...
0
votes
1answer
23 views

How to get subcategories on one page and products on another page?

I have category seating and I have some subcategories (sofa,chair) in it. I want one category page that shows list of sub categories and another page which shows all the products of the seating. We ...
0
votes
0answers
111 views

Magento - SQLSTATE[23000]: 1452 Cannot add or update a child row: a foreign key constraint fails

I get the following error when I try to reindex product Flat Data. This error happened after I deleted all products using SQL query. Exception message: SQLSTATE[23000]: Integrity constraint ...
0
votes
0answers
35 views

Assign Products to Specific Store Programmatically : Magento2

I am trying to assign different products of the main store to other stores programmatically. Is there any way to get it done?

1
2 3 4 5
20