Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [source-model]

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

I have created a system configuration to show the Categories list as assigned website-wise. When we change the website scope the categories list options are the same. Would you please share your ...
Prince Kumar's user avatar
1 vote
0 answers
168 views

Suppose MyEnity has column "status" in the database it values is 0,1,2 0 => None 1 => 'Good' 2 => 'Bad' I want In Add Page, source model display 1 => 'Good' 2 => 'Bad' In ...
Phạm Hòa's user avatar
0 votes
2 answers
652 views

I have a product attribute that have been added directly in the database threw a migration process. I want to update that attribute to give him a source. But this seems not to be working. $attribute = ...
Clong's user avatar
  • 1,344
0 votes
0 answers
211 views

Has anyone found an example of the product attribute with input type text and a source model? With a select input type - it is easy, but I cant find anything with text type.
Macas's user avatar
  • 511
1 vote
0 answers
67 views

I have a ui-component <field name="interest" formElement="multiselect"> <argument name="data" xsi:type="array"> &...
KEN IP's user avatar
  • 15
1 vote
1 answer
362 views

In Magento 2, I want to fetch group id from system.xml in my custom sourceModel But I am unable to find a solution online. Please do let me know if it's possible or not. I know there's an alternate ...
Ashwani Shukla's user avatar
2 votes
2 answers
1k views

I've created two dropdowns field in the system.xml , both of them have the same options, except that one has an extra option: None. This is the xml: <field id="printing_option" translate="...
Attila Naghi's user avatar
  • 4,213
2 votes
2 answers
431 views

Writing a new module and in my system.xml I can put the following: <field id="environment" translate="label" type="select" showInDefault="1" showInWebsite="1" showInStore="1"> <label>...
Mr Pablo's user avatar
  • 131
1 vote
2 answers
40 views

I have created a custom Multiselect product attribute. It has been created successfully but the value are saved when assigned store view specific. But if i select an option and save in global it is ...
aravind's user avatar
  • 1,862
2 votes
1 answer
66 views

What is the scope of source model extend and implement between these two? \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource \Magento\Framework\Data\OptionSourceInterface Attribute options ...
Muhammad Hossain's user avatar
1 vote
0 answers
27 views

I am facing "source model "xxx / xxx_xxx" for the attribute "xxx" was not found" with many module who's module name(Retailo_MobileGifting) is canonical. To change the name of all module is not a good ...
Jaimin's user avatar
  • 2,156
0 votes
0 answers
70 views

I have a question about the source model "Country". Currently, I can use, in my system.xml file, the following source_model : <source_model>Magento\Directory\Model\Config\Source\Country</...
Kozame's user avatar
  • 964
2 votes
1 answer
72 views

I have a product attribute, which is populated by a source model which is extended from AbstractSource. Because of this the attribute is not set with 'is_user_defined' = 1 and therefore I am not able ...
NetStorm's user avatar
  • 118
0 votes
1 answer
369 views

I am creating a bespoke extension and I want to allow the admin to choose to restrict by product types eg Simple, Configurable, Bundle etc The issue is I am not sure what source model to use. I have ...
Goose84's user avatar
  • 2,641
0 votes
1 answer
182 views

I have the code that create new attribute for category $setup->addAttribute('catalog_category', 'watermark', array( 'group' => 'Category labels', 'input' => 'checkboxes', '...
Petro Chaikivskyi's user avatar
0 votes
1 answer
694 views

I am trying to override/rewrite Magento\Fedex\Model\Source\Generic by using preference but to no avail. Is there some other way that is used to override source models in Magento 2?
Vivek Kumar's user avatar
  • 5,793
0 votes
1 answer
3k views

I added an attribute to customer entity My goal is to have this attribute as Select (with data from another db table), but i didn't find any tuto about the source/model that i should create !! Here ...
MageD's user avatar
  • 107
2 votes
3 answers
6k views

I am trying to add a new configuration field to my module's configuration page that uses a custom source_model, as soon as I add the field to system.xml the whole configuration section goes blank. If ...
Tahir Yasin's user avatar
4 votes
0 answers
358 views

My product pages show 404 page. There is something wrong with the catalog URL rewrites. Screenshot below. The error message I see is Invalid backend model specified: enterprise_catalog/...
Elvis's user avatar
  • 355
1 vote
1 answer
2k views

I am using a source model for fields of the configuration. I want to get all product attributes (no matter the product or the attribute set) in this source model.
Thomas F's user avatar
  • 125
2 votes
2 answers
386 views

as far as I understand when you have a <source_model> in your system.xml, it searches through the specified module for the function of getOptionArray(), right now I need to show all the ...
Nickool's user avatar
  • 1,069
2 votes
3 answers
4k views

System Configuration <field id="test" translate="label" type="multiselect" sortOrder="11" showInDefault="1" showInStore="1" showInWebsite="1"> <label>Cms Page</label> <...
Magento 2's user avatar
  • 3,834
1 vote
3 answers
5k views

I have created a multi-select EAV Attribute for my customers with a custom source model. However, whenever I browse to the customers management page or call getSource on the attribute, I get a class ...
Michaël St-Georges's user avatar
5 votes
2 answers
4k views

Since Magento 2.1 you have to define a UI component for custom category attributes (See Magento 2.1: how to create category attrbute programmatically?) I have one multiselect attribute with a custom ...
Fabian Schmengler's user avatar
6 votes
2 answers
10k views

I have created admin form. I am able to get customer group list using below code, but there is no "NOT LOGIN" group name so how can I get all group list? $objectManager = \Magento\Framework\App\...
Prashant Valanda's user avatar
0 votes
0 answers
597 views

I have a few attributes that come with input select or multiselect. I have created source models to provide options for inputs. Everything seems to work (values are saved). But today I realized that ...
Bartosz Kubicki's user avatar
10 votes
3 answers
2k views

I have several models in my custom extension that only serve the purpose filling in some selects and/or multiselects in the add/edit form of my entities. So they are what magento calls "source models"....
Marius's user avatar
  • 199k
7 votes
2 answers
13k views

I've created an attribute in Magento 2 of the type multiselect and now I want to have it populated by a custom source model. Now I remember from Magento 1 that when you want to do this, you had to ...
Giel Berkers's user avatar
  • 12.4k
1 vote
2 answers
1k views

trying to create a new model class to be used as a source model for the admin configuration setting of a new module, I got the following message: Class Makke\GroupOrders\Model\Config\Source\Sort ...
FraMakke's user avatar
1 vote
3 answers
4k views

My application is configurable, so I have a few settings in the system.xml file. One of the setting uses a custom adminhtml dropdown source model. So, in the XML, I have defined the setting row like ...
Latheesan's user avatar
  • 1,038
1 vote
2 answers
1k views

I am facing error in magento/admin catalog > manage product> and product. when I am trying to open Product its giving error : There has been an error processing your request Exception ...
Nisha Sharma's user avatar
1 vote
1 answer
55 views

I've developed a module where it allows clients to upload a single image via the adminhtml/system_config_backend_image_favicon which I've overridden. In what other way would you guys implement this? ...
André Ferraz's user avatar
4 votes
2 answers
3k views

Can anyone explain what is a source Model in Magento. various time it was asked by interviewer ...but it was confusing for me...can any body explain..... I need to know deeply about source model.. in ...
Deepak Rai's user avatar
  • 1,175
6 votes
1 answer
4k views

I'm trying to create an System configuration section with custom field values This is my code: system.xml <?xml version="1.0"?> <config> <tabs> <macerierconf ...
Macerier's user avatar
  • 163
1 vote
1 answer
128 views

I have an int/select attribute with a custom source model. Most things (admin, attribute save/load, indexing option IDs, filtering in layered nav, etc.) work fine. One of the things that's not working ...
laketuna's user avatar
  • 6,850
3 votes
1 answer
599 views

I have a custom attribute called collection (in retrospect, a horrible name all things considered,) with a custom attribute source model. The important part is here: public function getAllOptions() { ...
Tyler V.'s user avatar
  • 2,997
5 votes
1 answer
2k views

I have a product attribute with type "select", for example "manufacturer". No source model is defined, so Magento uses the default source model, defined in Mage_Eav_Model_Entity: const ...
Fabian Schmengler's user avatar
9 votes
1 answer
8k views

I have created custom product multiselect attribute successfully. But when i edit the product in admin and selecting some options(countries) of my multiselect attribute and if i click save its saved ...
sivakumar's user avatar
  • 307
2 votes
1 answer
4k views

I followed this tutorial here: http://inchoo.net/ecommerce/magento/how-to-create-custom-attribute-source-type/ In this tutorial, there are two key settings which I want to change: 'type' ...
Tyler V.'s user avatar
  • 2,997
16 votes
2 answers
7k views

What is the purpose of using these two models collection. Resource Mysql4 why can't we use resource model for all collections. Why we are using MySql4 collection for simple module Some one explain.
VijayS91's user avatar
  • 1,788
0 votes
2 answers
2k views

Hello good people of Stack Exchange. Our small business has recently transferred our website to a new Magento hosting agency and we are experiencing an issue with the functionality for exporting ...
user3182742's user avatar
1 vote
2 answers
1k views

I have a module: Model/SelectType.php class NAME_CustomField_Model_SelectType { public function toOptionArray() { return array( array('value' => '1', 'label' => '1'), array(...
Bob van Luijt's user avatar