Questions tagged [source-model]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
17 views

Multiselect attribute created not saving in Db

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 ...
2
votes
0answers
17 views

What is the scope of source model extend and implement?

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 ...
1
vote
0answers
17 views

Source model “mobilegifting / attributes_distribution” for the attribute “distributionsweg” was not found | Magento1

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 ...
0
votes
0answers
39 views

Countries in dropdown : 2 digits to 3 digits

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</...
2
votes
1answer
43 views

How can I have a Configurable attribute populated from a source

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 ...
0
votes
1answer
12 views

Source Model for Catalog product tye

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 ...
0
votes
1answer
81 views

Use source model to checkboxes in catalog attribute

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

Magento 2 : How to override a source model?

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?
0
votes
1answer
1k views

Magento 2 Add Custom Select to Customer : Source Model

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 ...
1
vote
3answers
2k views

Magento 2 backend configuration field with custom source model not working

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 ...
4
votes
0answers
281 views

Catalog URL Rewrites not working

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/...
1
vote
1answer
731 views

How to get all attributes in source model

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.
2
votes
2answers
141 views

source model for attribute set names

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 ...
2
votes
2answers
1k views

Magento 2 how to get all cms pages in system configuration

System Configuration <field id="test" translate="label" type="multiselect" sortOrder="11" showInDefault="1" showInStore="1" showInWebsite="1"> <label>Cms Page</label> <...
1
vote
0answers
2k views

Magento2: Custom source model - Class does not exist

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 ...
5
votes
2answers
3k views

Create multiselect with source model in UI component

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 ...
6
votes
2answers
5k views

How to get all list of customer group?

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\...
0
votes
0answers
427 views

Custom source model or attribute options

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 ...
10
votes
3answers
1k views

Unit testing source models

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"....
7
votes
1answer
8k views

How can I use a custom source model for a multiselect product attribute in Magento 2

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 ...
1
vote
1answer
778 views

Magento model extension experiment, return: “class does not exist”

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 ...
1
vote
3answers
3k views

Call to a member function toOptionArray() on boolean error when custom dropdown source model is used in system.xml

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 ...
1
vote
2answers
1k views

Magento error in catalog manage product: Source model not found for attribute

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 ...
1
vote
1answer
40 views

Magento 1 Source Model similar to favicon

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? ...
4
votes
2answers
2k views

what is source model in magento

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 ...
6
votes
1answer
4k views

System configuration custom source model error

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 ...
1
vote
1answer
101 views

Custom Source Model Attribute's Label is Indexed Incorrectly

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 ...
3
votes
1answer
566 views

Sorting Attribute (with custom source model) by dropdown label

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() { ...
5
votes
1answer
2k views

What's the standard way to load the source model of product attributes, with respect to the default source model?

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 ...
7
votes
1answer
7k views

Custom product multiselect attribute not saving in admin

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 ...
2
votes
1answer
4k views

Custom Attribute Source Model for Multiselect

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' ...
15
votes
2answers
6k views

Why magento use resource and mysql4 model collection?

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....
0
votes
2answers
1k views

Source model not found error message when exporting customer info

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 ...
1
vote
2answers
1k views

Can't find customer attribute source model

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