10

This is built in to most themes and all of the base themes. So I'm guessing what you want is to relocate the related products to another area. This is possible in a few different ways: Via layouts Using layout XML you can provide the following block declaration to any <reference> - <block type="catalog/product_list_related" name="catalog.product....


6

I'd like to address Raphael's answer in two ways (sorry, not enough rep to comment): The URL should be specified as ->getUrl('catalog/product/edit', [...], at least in Magento 2.1. (Instead of 'adminhtml/catalog_product/edit', which did not work for me.) It will still be in the adminhtml region. Furthermore, you will need to specify that the column is ...


5

After reading comments in which you've stated: I have done similar thing and it worked. I have settled with that solution. but i wanted to generate a new proxy class which had new methods included. As the proxy class is used to reduce the load of initializing the class. now as the proxy class is no longer used, the original class will take some more ...


2

I had the same problem trying to create related, upsell, cross-sell. I ended using something this: $q = $this->_objectManager->get('\Magento\Framework\App\ResourceConnection'); $q->getConnection('core_write')->query("insert into catalog_product_link (linked_product_id, product_id,link_type_id) values (".$linked_product_id.",".$product_id.",".$...


2

All links will be overwritten, if you call ProductInterface::setLinks method. You can try to add new links in already existed product links array. Example: $links = $product->getProductLinks(); $links[] = $newLink; $product->setProductLinks($links); $this->productRepository->save($product);


2

I managed to generate the correct Proxy.php file that included my new function by adding the following to my module di.xml <type name="Magento\Catalog\Model\Product"> <arguments> <argument name="productLink" xsi:type="object">Package\Module\Model\Product\Link\Proxy</argument> </arguments> </type> Thanks @...


1

Remove $linkData[] = $productLink; and instead do $product->setProductLinks($linkData); , I think there is problem with the scope of $linkdata[] . Modified code ; $productLink = $this->productLink; foreach ($collection as $item) { $productLink->setSku($product->getSku()) ->setLinkedProductSku($item->...


1

You can do that by doing the following modification: <column name="product_id" class="Vendor\Module\Ui\Component\Listing\Columns\ProductId"> Then you need to create Ui\Component\Listing\Columns\ProductId.php in your module folder with the following content: <?php namespace Vendor\Module\Ui\Component\Listing\Columns; use Magento\Framework\View\...


1

You would need to pass the description through the correct parsing engine. Eg. Output using Mage::getSingleton('widget/template_filter')->filter($product->getDescription()); And set the URL in the description using standard shortcode syntax using the product link widget {{widget type="catalog/product_widget_link" template="catalog/product/widget/...


1

I have not done this or know of an extension that does it, but it certainly looks possible after some quick test. There is a table called catalog_product_link_attribute_varchar that doesn't seem to be used (correct me if I'm wrong). The varchar column value here is perfect for storing a short description of the link. You can utilize this table to store the "...


1

Check this block in catalog.xml <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/> just put like this if you want to display in your content area <reference name="content"> <block type="catalog/product_list_related" name="catalog.product.related" ...


Only top voted, non community-wiki answers of a minimum length are eligible