Skip to main content
17 votes

Why the error when creating a new product "Asymmetric transaction rollback."?

I was just getting the same error (Asymmetric transaction rollback) when I tried to update some categories after importing data using the Magento data-migration-tool. A manual reindex fixed the ...
Michael's user avatar
  • 502
12 votes

Magento2 : How to show New label in product list page

Propably the best option is to add new helper with following code: <?php namespace Vendor\Module\Helper; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Product as ...
Bartłomiej Szubert's user avatar
9 votes
Accepted

Magento2 : How to show New label in product list page

Create helper and add code. <?php namespace Vendor\Module\Helper; use Magento\Framework\Stdlib\DateTime\TimezoneInterface; class Newlabel extends \Magento\Framework\Url\Helper\Data { /** ...
Suresh Chikani's user avatar
7 votes
Accepted

Magento 2 programmatically get latest products?

try this $productCollectionFactory = $objectManager->get('\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory'); $collection = $productCollectionFactory->create(); $collection->...
Sagar Dobariya's user avatar
6 votes

Why the error when creating a new product "Asymmetric transaction rollback."?

The issue is resolved and the following are the steps Reindex by using the following command php bin/magento indexer:reindex run below commands rm -rf var/cache/* rm -rf var/page_cache/* rm -rf ...
Sudheer Singamsetti's user avatar
4 votes
Accepted

Magento2 Add to Cart from homepage not working

The solution (for no clarified reason) was to enable all Magento caching options. This solved the issue for me. Tested this again in a new install: Fresh Luma templated with new product widget on the ...
Rann's user avatar
  • 331
4 votes

Why the error when creating a new product "Asymmetric transaction rollback."?

Also, this error occurs in a situation when you have configured external search engine (Solr or Elasticsearch) and it is unavailable during product/category save.
yaronish's user avatar
  • 798
3 votes

Why the error when creating a new product "Asymmetric transaction rollback."?

It is not a complete solution but it can help you to detect the source of the problem in some cases. Comment out the around save plugin in this class Magento\CatalogSearch\Model\Indexer\Fulltext\...
martin_mageworx's user avatar
3 votes

how to override vendor/magento/module-catalog/Model/ImageUploader.php in my custom module and magento showing error "Code Duplicates Detected"

Do not just copy the entire file from the core files- here what you need to do is to extend your class form core file and put the methods in your class in which you have made any changes; otherwise it ...
Verdu's user avatar
  • 1,730
2 votes

Magento 2 Sort by New Products and Most View Product

Try this: Company\Module\Model\Config public function getAttributeUsedForSortByArray() { $options = ['bestseller' => __('Best Seller'), 'newest' => __('Newest'), 'mostviewed' => ...
Yogesh Agarwal's user avatar
2 votes

The label New not displayed on all new products magento 2

if (($newsTo != '' || $newsFrom != '')) means newsfromdate or newstodate not be blank. You can set date from particular product. $_config->getAdvanced('show_newlabel') this one like configuration ...
Dipak Bhambhani's user avatar
1 vote
Accepted

How to display newly added widget for a particular category

Update your class with below code: <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Dyode\Newproducts\Block\Product\Widget; /** * ...
Sukumar Gorai's user avatar
1 vote

Magento2: how to develop rest API to get new products

Change return type for SR/MagentoCommunity/Api/NewproductInterface.php <?php namespace SR\MagentoCommunity\Api; interface NewproductInterface { /** * GET new product list * ...
Sohel Rana's user avatar
  • 35.9k
1 vote
Accepted

Auto-expand subcategories in product form

You can use this tag in config if you are creating it in ui-component. <item name="levelsVisibility" xsi:type="number">3</item> change the number according to your required levels. ...
Ghulam.M's user avatar
  • 963
1 vote

Remove title New Products from Magento 2 Content New Products Widget

You need to override vendor/magento/module-catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml in your custom theme at app/design/frontend/Vendor/theme/Magento_Catalog/templates/...
Sejal Shah's user avatar
  • 2,141
1 vote

Remove title New Products from Magento 2 Content New Products Widget

override items.phtml file from vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml to your theme app/design/frontend/Vendor/Theme/Magento_Catalog/templates/product/...
Ahmed Atef's user avatar
1 vote

How to Remove New Products Block products Price for store 1 not for store 2

Don't comment the code just add it in condition Something like below $storeId = Mage::app()->getStore()->getStoreId(); if($storeId!=1) { echo $this->getPriceHtml($_product, true, '-...
satya prakash patel's user avatar
1 vote
Accepted

Magento 2 How to make status disable when create new products

After some hours of research, I found solution: Create а plugin for the class that is responsible for the status switch output on the product page. Module_Root/etc/adminhtml/di.xml <type name="...
Evgeny Levinsky's user avatar
1 vote
Accepted

Magento 1.9 - Get new products

Here is an example you can try this, It will give you last added item of last 10 days. require_once 'app/Mage.php'; Mage::app(); umask(0); $date = Mage::getModel('core/date')->date('Y-m-d h:m:s');...
Chander Shekhar's user avatar
1 vote

I have create admin grid in magento 1.9 .It was not working getCollection error how to solve please help me

try this code $collection = Mage::getModel('developer/developer')->getCollection();
mohan's user avatar
  • 352
1 vote
Accepted

How to show New Product 1st on Category page

Well, as a programmer, you will not do this if you think you are expert. But, who know, this is a easiest and fastest way to get the system work well, get all of products of all of categories sort by ...
Arunendra's user avatar
  • 7,458
1 vote

How to Remove the items from a category automatically based on date?

You can achieve this by two methods. 1) Cron you need to create a cron which will execute as per your required time frame and make the changes accordingly. you can follow the following url to ...
Ashish Madankar M2 Professiona's user avatar
1 vote

Magento 2 List newly created products

Create a custom module in block file use use Magento\Catalog\Model\ProductFactory; use Magento\Framework\View\Element\Template\Context; protected $_productFactory; public function ...
Vishwas Bhatnagar's user avatar
1 vote
Accepted

Why new products are visible smaller as compared to recently products on homepage. Today it looks fine but how come

It's because your new products name is smaller than the older one. You need to assign products name in equal lengths or give the specific minimum-height to the name class in your css. This may be ...
Nitin Pawar's user avatar
  • 1,546
1 vote

New Products 3 columns on Home page CMS

Just try to add {{block type="catalog/product_list" limit="4" category_id="13" template="catalog/product/list.phtml"}} To accomplish this using layout.xml then use setLimit <action method="...
Teja Bhagavan Kollepara's user avatar
1 vote

New Products 3 columns on Home page CMS

In your theme's new product template on path catalog/product/widget/new/content/new_grid.phtml set value of $_columnCount to 5
Piyush's user avatar
  • 5,904
1 vote

New Products 3 columns on Home page CMS

Try this, styles.css line no: 4230 change left to .products-grid > li:nth-child(3n+1) { clear: none; } Line no:4314 .products-grid > li { margin-right: 1% !important; width:...
Magento 2's user avatar
  • 3,834
1 vote
Accepted

How to Add New Products Automatically in Magento 1.9?

In order to do what you want you'd have to create a simple module that would hook into event called catalog_product_save_before. In that observer you'd have to check if product's new by looking at ...
versedi's user avatar
  • 2,059
1 vote
Accepted

new products list - with title & short description

Add below code in your file app/design/frontend/yourtheme/yourpackage/catalog/product/new.phtml <?php /** * Product list template * * @see Mage_Catalog_Block_Product_List */ /* @var $this ...
Yogesh Trivedi's user avatar
1 vote

Why the error when creating a new product "Asymmetric transaction rollback."?

I have another solution for this one issue and it's easy. Just you can change reindex mode for product related indexer ->Update by schedule.
Magento2 Devloper's user avatar

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