Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
3 answers
103 views

Magento 2 + custom eav field value store in array

I have a custom eav structure and there is store_id save in array format in the database field. I need to filer collection with addFieldToFilter with store_id. $collection = $this->...
Mage2 Developer's user avatar
1 vote
1 answer
301 views

How to display only USA states as a select drop-down in custom phtml in Magento2.2.5?

I want to display only USA states as a select drop-down in custom phtml in Magento2.2.5? Any help would be appreciated.
Amy's user avatar
  • 945
6 votes
3 answers
12k views

How to get configurable attribute label and value in magento 2?

To use Object Manager is not a proper way but this code is for testing purpose only. I want to get attribute value which is available in configurable products. I have tried with below code, but I get ...
sky's user avatar
  • 1,397
2 votes
0 answers
819 views

How to change the category collection before load?

I'm trying to figure out how to change the category collection before load. To be more specific, I've created a category 'Sales'. The category is empty with no products. I want to automatically add ...
Tsita's user avatar
  • 371
4 votes
1 answer
2k views

How set order with custom field column magento 2

I want to setOrder with custom field column in get list product. I override toolbar.php but it's not working di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
Jerry Nguyen's user avatar
3 votes
0 answers
5k views

Magento 2: Duplicate key-sequence unique identity-constraint 'uniqueVirtualType' fatal error while di:compile

When i run php bin/magento setup:di:compile it gives me below error [Magento\Framework\Exception\LocalizedException] Invalid Document Element 'virtualType': Duplicate key-sequence ['Custom\...
Jackson's user avatar
  • 9,969
0 votes
1 answer
1k views

Dealing with collections from my model in Magento 2

I'm trying to follow Alan Storm's tutorial here. The code works fine when I try to insert or retrieve a single record, but it cracks when I use collections. I followed all steps he illustrated in ...
Digital fortress's user avatar
0 votes
2 answers
1k views

Magento 2 Custom Module Delete Issue [SOLVED]

I'm using Magento 2 Version 2.1.0 {folder path}\magento2\app\code\Custom\Module\view\adminhtml\ui_component\custom_module_index.xml <massaction name="listing_massaction"> <argument name=...
Jackson's user avatar
  • 9,969
17 votes
1 answer
34k views

how to add pagination on custom collection in Magento 2

I am working on custom module. How can i use default magento pagination with my custom collection and also set custom limits on that?
Qaisar Satti's user avatar
  • 32.5k
1 vote
1 answer
2k views

set custom limit for pagination magento2

how can i set the custom limit for pager. this is adding the limit in page and page is showing but the dropdown on limit is not showing on page how to dropdown of limit on Custom Collection. ->...
Qaisar Satti's user avatar
  • 32.5k
10 votes
2 answers
11k views

Whats the best way to check if a custom attribute exists in Magento2

In being careful, I want to check if my custom attribute exists before I attempt to utilize it in any way. I need to check against all attributes collection, not just the product collection. My ...
CarComp's user avatar
  • 1,256