Questions tagged [related-products]

Denotes questions about Magentos related products feature.

Filter by
Sorted by
Tagged with
2
votes
1answer
756 views

Magento Rule Based Related Products

We are attempting to set up Rule Based Relations, a feature of Magento Enterprise. Specific Magento version is EE 1.13.1.0 So basically you set which products are the related products, and which ...
0
votes
0answers
20 views

Magento 2.3 color swatches with related products & upsell products?

I have added color swatches with related products using this code: <?php if($_item->getTypeId() == \Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE){ $...
0
votes
1answer
803 views

Related product to have quantity added to cart

I need related products to have a quantity input on the view page and for the add to cart button to carry this quantity to the cart with the product. Can anyone advise, thanks.
1
vote
0answers
14 views

How to change product image on swatch selection on related product on product view page in Magento 2?

I have color swatches on related products list on product page. I want to change product image on the basis of swatch selection on view page. How can I change image?
0
votes
0answers
14 views

How to limit “Related Products” in Magento 2.3.2

I am used to be able to set the "Related Product" limits in /app/design/frontend/theme/theme/Magento_Catalog/product/list/items.phtml by changing case 'related': /** @var \Magento\Catalog\Block\...
0
votes
1answer
1k views

How to remove related products check boxes on magento2

I've used app/design/frontend/<your_vendor_name>/<your_theme_name>/Magento_Catalog/templates/product/list/items.phtml to set $showCart = true; so that an Add to Cart button is used for ...
0
votes
0answers
9 views

Upsell Products

After adding an item to your basket from the category page, i have a pop up showing you the product you have just added, you cart total etc. I was wondering if its possible to get the upsell/related ...
4
votes
2answers
38 views

Magento 1.9.3.X: Get all related products of a product

I need to retrieve related products from a particular product with id. I tried using the getRelatedProductCollection method unsuccessfully, not sure if this method is. I need to get these related ...
0
votes
1answer
898 views

How can I display the product short description in the related product template?

I need to display the related product short description in a magento 1.9 store. What do I need to add to the template->catalog->product->list->related.phtml file?
3
votes
0answers
24 views

Error: The same url in all products Magento 1.9

I've tried to show the related products under the images of products. Until here all is ok, but the URL of the products is showing always the same of the first related product How can I solve this? ...
0
votes
0answers
15 views

Whats the difference between getCrossSellProductCollection and getCrossSellProducts

I am trying to understand difference between getCrossSellProductCollection and getCrossSellProducts in layout module for cross sells. As in my admin panel HTML vendor/magento/module-catalog/Block/...
1
vote
1answer
5k views

Magento 2 : Display Related Products Block in Product View

I'm using magento 2.1.3 and I want to display related products under product_view. Product view is using 1 column template. I've added successfully related products to some products. I've reindexed ...
0
votes
1answer
33 views

How to move related products at very bottom of product page?

I want to display the related products at very bottom of the product page. How can I move it? Can anyone please explain me?
5
votes
3answers
14k views

How to show related products in product view page in Magento 2?

How can I show related products on bottom section of the product view page? I want to show 3 related products in bottom part of product view page in Magento 2
6
votes
2answers
733 views

Magento2 Extending Magento\Catalog\Block\Product\AbstractProduct Class

I wanted to add some extra custom methods to the block classes: Related Upsell Cross-sell Each of these extends the Magento\Catalog\Block\Product\AbstractProduct But using di.xml preference I was ...
0
votes
0answers
9 views

Discount on related products magento 2.3.1

We are using magento 2.3.1, I was wondering if there is a way to apply a discount on related products if a product is added to cart. Do I need to create a custom rule or something? any suggestions? ...
1
vote
1answer
867 views

How to filter related product collection by is_salable magento 2?

Related products are showing with out of stock products, I want to hide out of stock products from related products only. $this->_itemCollection = $product->getRelatedProductCollection() -&...
0
votes
0answers
18 views

Related products broken on product detail page

On Product, detail page design is being broken.We didn't have done any customization. Please refer @ https://drive.google.com/file/d/1WM03YuvMAlCnt54JqG_B6McDZYPHxyG2/view
0
votes
2answers
3k views

How do you display more than 3 related products in Magento 1.9?

Magento is only displaying 3 related products; I'm looking to display 5. What am I doing wrong/What do I need to change?
1
vote
1answer
84 views

How can i disable Related Post tab on product page magento 2?

I want detail tab to active at first also related product tab to be hidden or disable.
5
votes
1answer
384 views

Need to show related products of simple product in configurable product

I need to show related products block on configurable product page (as it is by deflault), but instead of related products of configurable product i need to show related products of simple products ...
1
vote
0answers
22 views

How to show configurable product as related product with their options in Magento

The problem is that when I add a configurable product as a related product, it shows the product but there is no checkbox. I have read that in Magento2 when the related product is a configurable one ...
0
votes
1answer
19 views

Assign related products from categories (Magento 1)

We have a magento store and we have over 1000 products listed. We want to assign random related products, but they should be within the category. For example, if a product is listed under Men >> T-...
3
votes
1answer
136 views

Get Configurable Product options, Price And Add to cart Button On Related Product Section

How to get Configurable Products options, price on related products sections. Also, put add to cart button on each product. right now related products show only the price as low as but want to add ...
1
vote
1answer
255 views

Magento 2.3: Error Assigning Related Products

Trying to add some related / cross-sell and upsells to products in the admin but receiving the following error after saving the product: The linked products data is invalid. Verify the data and try ...
1
vote
1answer
83 views

How to show both at same time Upsell and Related Products In Product View Page Magento 2

I want to show Related and Upsell both at the same time in my product view page. I tried to change catalog_product_view.xml many times, but it displays me only upsell products not related. anyone, ...
1
vote
0answers
58 views

How to Hide Empty related Product in Magento

I hope someone can help me. I have a website in Magento 2, and I want to hide the related products when they do not have articles. I have added my list of products and some have related products and ...
2
votes
1answer
195 views

How to fix the related product issue in admin after migrated to magento 1 to magento 2.3

I am using Magento 2.3.0 I have migrated products from Magento 1 to Magento 2. I can see related products in product detail page in the front end and it is proper and also I can find related products ...
1
vote
1answer
84 views

How to override product model files in Magento 2?

I am using Magento 2.3 I have override below core file. vendor/magento/module-catalog/Model/ProductLink/CollectionProvider.php To override this file I have created a new custom module in app/code ...
1
vote
0answers
59 views

Magento 2: Backend Related, Upp-Sell and Cross-Sell Product Tab Filter Issue

When I filter Product By Name in related product tab product filter Working Completed, but without product add called save function directly and page redirect to the Catalogue page.Any idea,please ...
1
vote
0answers
26 views

Show Product Out of Stock if Related Item Out of Stock

Is there a way in Magento 2.2.1 to mark a product out of stock if the related item is out of stock?
1
vote
0answers
18 views

Product page (Related.php) error in Magento 2.1.16

I override the page Related.php and add my extra custom function in this class it works perfectly on 2.2.X but in 2.1.16 it shows me this error Warning: Invalid argument supplied for foreach() in /...
2
votes
1answer
49 views

How can I add an attribute to related products?

I would like to Add the sku to the related products. I am in the template Magento_Catalog/templates/product/list/items.phtml. This is what it looks like now- <?php /** * Copyright © Magento, Inc. ...
0
votes
0answers
29 views

Magento 2 get third product image for related products

Related products are now showing the default image, How can I change it so that the 3rd image is displayed for every item in the related section? I have looked at $_product->getMediaGalleryImages()...
1
vote
0answers
60 views

Magento2.5 Related Products image url path incorrect after moving website

I recently moved a Magento 2.5 based website to a new server and now on the product detail page the related products the product images are not loading. Upon inspecting the image tag I see the url is ...
1
vote
0answers
15 views

Can we show different add-ons and upsell product in per website by passing the same SKU?

Currently if we add upsell/add-on products to default it wont let you to change it on each store view. All the upsell and add-ons will be the exact same as default. Is it possible to change upsell/...
0
votes
0answers
14 views

How can we retain full path url for related products when we import data in bulk?

We have loaded data for the related products using bulk import functionality in our Magento admin panel. But the urls of the products are redirecting us to the category listing page instead of the ...
0
votes
1answer
299 views

How to get related product collection in block

I use this way to get related product collection /** * Prepare and return product collection * * @return \Magento\Catalog\Model\ResourceModel\Product\Collection */ public function ...
2
votes
0answers
472 views

Magento related products get category

I want to edit my /catalog/product/list/related.phtml file. I want to define all related products based on their main category. So for example that all mices are displayed in their category "Mices" ...
0
votes
1answer
70 views

Magento 2 Ui component model not opening | Related Products

I'm trying to implement the same functionality as we get in Product edit form for Add new Related Products. In my custom module, I've tried to implement the same functionality. So I've I'm getting ...
0
votes
1answer
494 views

Filter related products, crossell and configurable options in observer

I'm trying to filter these collections without any change to the template, I had no problems with the up-sell (not tested), but the other two doesn't have an event. Note: The dom structure is unknown ...
0
votes
1answer
443 views

Magento 2.2.3 Related Products add to cart button issue

i'm just wondering if anybody faced with following issue. I have enabled "add to card" button on my Related products as per this article Now button appeared but the problem is that is actually does ...
2
votes
1answer
1k views

Crosssell Products on Product Page with Magento 2

I have been trying to get crosssell products to show on the product pages. however adding the block does not work as it relies on the product being in the cart. I have tried to overcome this by ...
1
vote
1answer
71 views

Magento 2 not passing minimum QTY when adding related products to cart

I'm currently experiencing an issue on Magento 2.2.5. We have a number of simple products that have a minimum order qty set as 100. If I view on of these simple products, we'll call this Product A. ...
0
votes
0answers
23 views

Related product update error

I tried to update the related product via script in magento 1.9.3.7 but i am getting one error. I don't have an idea related to this error. <?php ini_set("display_errors", 1); //require dirname(...
0
votes
3answers
1k views

Magento 2 - How to show related products in a thumbnail slider?

I want to show related products and upsells products in a thumbnail slider on product page. I am using Luma child theme. How to achieve this? Is there anyway to integrate Flex slider in my theme? ...
1
vote
4answers
4k views

Magento 2 : How to display swatches in related products?

I added related products list in product details page. I see there all related products list are display but now i need to display swatches in this list. How can it possible for related products list. ...
0
votes
0answers
27 views

is it possible to filter related products using status enabled filter Attribute in products details page magento 2 custom theme

Is it possible to filter related products using status enabled filter Attribute in products details page magento 2 custom theme in related.phtml. Actually i am trying to get only in stock related ...
0
votes
0answers
117 views

how to get custom attribute value for related products in product details page

I am overriding default related.phtml in custom theme Magento_Catalog but data is not showing properly.If Any One have idea please help me. <?php if ($currentProduct = $block->getProduct()) {...
1
vote
2answers
2k views

Magento 2: Get Related products from Product Id now showing Name and price

Below is my code to get related products from products id, It is working fine but not giving values for name and price it just gives SKU and id $objectManager = \Magento\Framework\App\ObjectManager::...