Questions tagged [magento2]

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'Magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

Filter by
Sorted by
Tagged with
5 votes
3 answers
5k views

Magento 2 and Zend Framework 2

Since Magento is planning on using Zend Framework 2, does that mean that all the current extensions that utilize ZF1 are going to break? From what I know about ZF2 and ZF1 is that they are very ...
Aedonis's user avatar
  • 435
19 votes
2 answers
1k views

Magento 2 DI best practices

Let's say I'm building a Magento 2 extension that does....well...not important. Let's say it does super awesome stuff. But I want to make sure that this is build using the proper standards so other ...
Marius's user avatar
  • 198k
60 votes
3 answers
29k views

What is the difference between type and virtualType

In the di.xml that comes with Magento2 there is a node type and a node virtualType. My questions is what is this virtualType and in what case should it be used instead of type? In some places it ...
David Manners's user avatar
9 votes
3 answers
1k views

Does interception in magento2 replace observers in magento1?

Is interception intended to be the preferred method when dealing with changing the behavior of an original method in Magento2 as observers was in magento1? https://wiki.magento.com/display/MAGE2DOC/...
Matoeil's user avatar
  • 607
2 votes
1 answer
2k views

Magento External Shipping Costs through a Custom API

I am trying to accomplish the following. I need to be able to add a custom shipping module that grabs shipping costs from an external system through an API. Once a customer gets to the point of ...
branimalus's user avatar
4 votes
1 answer
1k views

How to return store admin variables in magento2

how simple would it be to do as in magento1 Mage::getStoreConfig('general/store_information/name')
Matoeil's user avatar
  • 607
11 votes
2 answers
23k views

How to instantiate a block in magento2

Is there a simple way as in magento1 : $crumbs = Mage::app()->getLayout->getBlock('breadcrumbs');
Matoeil's user avatar
  • 607
14 votes
3 answers
10k views

How to instantiate a model in magento2?

Is there a way of doing something simple as in magento2? call function like this in magento 2, $model = Mage::getModel('cms/page');
Matoeil's user avatar
  • 607
2 votes
1 answer
401 views

Magento : url structure

Please explain what is the meaning of this statement in Magento $this->_redirect('*/*/');
PankajR's user avatar
  • 210
7 votes
4 answers
25k views

MySQL error while importing database

I want to upgrade Magento. Therefor I first want to transfer the live production system to a development workspace. I am trying to import the production database into a clean database. But I can't get ...
PeterPayn's user avatar
9 votes
1 answer
17k views

Magento 2 Fatal Error :: Maximum Functions Nesting Level of '100' reached

I got this error after installing Magento 2 on my local machine over wamp software: Fatal error: Maximum function nesting level of ’100′ reached, aborting! in \magento2\lib\internal\Magento\...
Yogesh Trivedi's user avatar
1 vote
2 answers
1k views

how to add delivery slot in magento?

delivery slots will be: 11am - 1pm 3 -5 pm 5 – 7 pm 7-9pm 9-10:30 pm User can choose any delivery slots for today and tomorrow . Only those time slots will be available to choose which will have 3 ...
sonal's user avatar
  • 305
2 votes
1 answer
492 views

Where to put custom model function

I created a module and I have a collection model class(under Model/Mysql4/MyModule/Collection.php), resource class (Model/Mysql4/MyModule.php), abstract model class (Model/MyModule.php) and a setup ...
Michel Gokan Khan's user avatar
3 votes
2 answers
4k views

How do I reset Magento Admin User Role

I went into Admin->System->Permission->Roles & edit the role for Admin Now, i am unable to re-set back it to original "ALL" permissions. How can i revert back to original settings ? Thanks
Mave's user avatar
  • 483
12 votes
4 answers
8k views

Magento 2 Helper instance

When I think I got my head wrapped around the DI system from Magento 2 something comes up and un-wraps it. I see in the core code different ways to access a helper. For example in Magento\Catalog\...
Marius's user avatar
  • 198k
4 votes
1 answer
2k views

SASS in 1.9 - LESS in 2 - Why?

As I familiarize myself with Magento's implementation of SASS, I recalled this bit from the Magento 2 wiki: https://wiki.magento.com/display/MAGE2DOC/CSS+Preprocessing+in+Magento+2#...
pspahn's user avatar
  • 4,648
2 votes
0 answers
58 views

Implimenting Custom Controller with payment option issues [closed]

I'm hoping someone can contribute to my complex issue. We have implemented a custom registration form with the aim of enrolling 'consultants'. Part of this enrollment is to order a special starter ...
cygnus digital's user avatar
0 votes
2 answers
689 views

How to export all the products that are not assigned to any category?

I am looking for a way to export all the products that are not assigned to any category. I know it can be done using XML, but I don't have enough knowledge in XML to create an Action so is there any ...
Kevin S's user avatar
  • 169
4 votes
1 answer
334 views

In what order are theme files processed?

Please note this question is about the yet-to-be-released Magento 2, which I'm still trying to get to grips with. Each module contributes to each layout handle separately. For example, the default ...
clockworkgeek's user avatar
1 vote
1 answer
96 views

reinstalling a module which don't rebuild the database

I installed a module which will build a table in database, then i manually drop that table, then i uninstall the module, after that, i reinstall the module but the table don't rebuild, how can i fix ...
hkguile's user avatar
  • 2,221
31 votes
10 answers
48k views

How to change the Admin session time in Magento?

It is possible that sometimes the time that the admin session is active is too short. How to change the time it takes to auto-logoff the user from the back-end?
Meetai.com's user avatar
1 vote
3 answers
1k views

Does Magento2 work only on Linux OS?

I am trying to install Magento2 on my local machine but it is not working properly It throws the following error: Fatal error: Maximum function nesting level of '100' reached, aborting! in \lib\...
Ankita P.'s user avatar
  • 131
4 votes
2 answers
843 views

My backend module work in window but not in linux

when i access the module in my linux server using this link domain/index.php/AdminLog/adminhtml_adminlog/index/key/0ae0ba00e17e37611025f3cd9f49a395/ it redirect me to frondend and display 404 error, ...
hkguile's user avatar
  • 2,221
4 votes
4 answers
22k views

Magento2 - After login redirect to previous page instead of My Account page

Is there a simple way to sovel redirect url customize in Magento? I'v searched some articles mentions "controller". But I have no idea about custom extensions. How to override the base controller ...
Wen Wei's user avatar
  • 353
1 vote
1 answer
240 views

Standard module version numbers

Is there any convention for version numbers and community modules? I see a varied combination of the following as starting numbers: 1.0.0 0.1.0 0.0.1 I always tend to use the last one: 0.0.1 but ...
Marty Wallace's user avatar
2 votes
1 answer
547 views

Magento 2 - Custom Currencies

A cursory review of some classes in the Magento 2 codebase seems like the core devs do not intend to change how currencies are architected in the new version. Shouldn't this be reconsidered in light ...
pspahn's user avatar
  • 4,648
1 vote
1 answer
452 views

n98-magerun extension:list

I am new to working on the command line and have tried to venture in to using n98-magerun. So far I have downloaded it placed it in the folder that holds all my sites sym-linked it to the folder i ...
tony09uk's user avatar
  • 1,707
5 votes
2 answers
4k views

programmatically create a custom variable

I followed the trace of a custom variable and I notice that it create entry on core_variable_value and core core_variable as well as in the logging table, I need a custom variable in one of my CMS ...
isJustMe's user avatar
  • 265
51 votes
15 answers
148k views

How do I set Developer Mode in Magento 2

I'm trying to install Magento 2 but I am getting the following error: Error happened during application run. Could not write error message to log. Please use developer mode to see the message. I ...
Paul Donnelly's user avatar
4 votes
1 answer
3k views

Is it safe to modify database table column datatype directly?

I am able to change Catalog Price Rules' from_date and to_date from "date" datatype into "datetime", by overriding the classes: Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main ...
Obay's user avatar
  • 357
0 votes
2 answers
3k views

Magento2 - Override theme phtml [closed]

How override a default phtml in Magento 2? I want to update/improve the theme "magento_plushe". I add a file on app\design\frontend\magento_plushe\Magento_Theme\html\header.phtml But Magento ignore ...
John_iw2's user avatar
1 vote
1 answer
82 views

magento community extension update problem

I created a paid community extension with version 1.0.0, and in this moment I have an upgrade for it with version 1.0.1. I add this version in Magento Store at http://www.magentocommerce.com/magento-...
cosmin's user avatar
  • 11
3 votes
1 answer
113 views

Examples of well written modules

Can anyone point me in the direction (github or magento connect) of any well written modules in terms of code/architecture and not functionality? Preferably also using unit tests or magespec. It ...
Marty Wallace's user avatar
27 votes
5 answers
29k views

Instantiating Helpers in Magento 2

The latest builds of Magento 2 have done away with the Mage class. This mean we've lost the Mage::helper method. Is there a replacement technique (helper factory?) for instantiating helpers in ...
Alana Storm's user avatar
  • 44.3k
2 votes
1 answer
620 views

Magento2 (pre-alpha) theme not showing in Admin [closed]

I created my own theme based on the blank theme but I can not get it to show in Admin <design> <package code="default"> <title>Default</title> <theme ...
brentwpeterson's user avatar
3 votes
3 answers
959 views

Importing Attribute Price on Vague Feeds

This is less a programming question and more a process/policy question. When dealing with product feeds from manufactures/resellers, it's very common to run into a product variant that looks ...
Alana Storm's user avatar
  • 44.3k
2 votes
3 answers
2k views

Magento cron - question about timings

If my main crontab runs the magento cron.php every 30 mins and i have a cron job set in a modules config.xml to run every 15 mins. Will that mean the modules cron gets run: Once every 30 mins Twice ...
Marty Wallace's user avatar
10 votes
3 answers
2k views

Magento 1 Class Rewrite in Magento 2 with Dependency Injection System

Poking around Magento 2's core code, it looks like the old class rewrite system has been ripped out and replaced with a new dependency injection system. Unfortunately, there's no documentation for ...
Alana Storm's user avatar
  • 44.3k
2 votes
2 answers
1k views

Build Magento module from the command line

looking at the output of mage shell script it seems that it is possible to build a module via the command line. Does anyone have and idea how i can do it? Connect commands available: =================...
Evgeni Ivanov's user avatar
3 votes
4 answers
308 views

Translating an Extension

Are there any tools for generating a csv file for translations of a module? I.e. detecting calls to __() within a module and outputting the information into a csv ready to be used as a translation ...
Peter O'Callaghan's user avatar
5 votes
3 answers
3k views

Constructor for Magento Controller

I need constructor or init function that can be run for my custom module. I need to call it every time when request made to my module's controller in magento.
Kamesh Jungi's user avatar
3 votes
1 answer
638 views

Magento 2 Tests in Magento

We are looking to start using testing for our builds and are looking at the best tools to use. I noticed there is a port of the Magento 2 tests https://github.com/techdivision/...
Paul's user avatar
  • 1,706
2 votes
1 answer
4k views

Check If JQuery Is Already Included In Head

I want to check if jQuery is already included on the page. I have seen several methods and finally settled on the following: if ( (typeof jQuery === 'undefined') || !window.jQuery ) { document....
Jongosi's user avatar
  • 1,501
4 votes
1 answer
270 views

Admin field type with arbitrary number of subfields

I'm making some custom module for magento and need backend settings for my custom entity. So far all was ok, I made a section through xml, made general CRUD actions and some settings that are ...
nevermourn's user avatar
3 votes
3 answers
143 views

How to deal with site configuration when building new site

What is the best way to deal with site configurations when building a site? I am currently religiously using upgrade and install scripts for everything, meaning a zero configuration state when moving ...
Marty Wallace's user avatar
4 votes
2 answers
3k views

Magento ensure module config is loaded last

Is there a way to ensure that a module and its config xml is loaded last in Magento, or at least after a specific other module? I want to avoid using the <depends> tag because it may not be 100%...
Marty Wallace's user avatar
2 votes
1 answer
2k views

Need help passing form values from checkout to a redirect page that goes to an external payment gateway

I need help in developing an external payment method module. I have so far already managed to get the method to appear correctly on the admin, and on the checkout page. The next step is to send some ...
Unckmania's user avatar
3 votes
1 answer
85 views

Admin module with as many image slots as user needs?

Something I use a fair deal in wordpress is allowing users to duplicate a field, so i provide one image slot and they can click a [+] button and get another image slot. I'm trying to make a quick ...
Chris Morris's user avatar
  • 1,517
2 votes
1 answer
1k views

Multiple Where Statements

I have the following line of code $select = $read->select() ->from($batchTable,array('id','batch','strength','flavor','brand')) ->where('status', 1) ->...
Jeffrey L. Roberts's user avatar
2 votes
1 answer
141 views

Setup Script Not Working Properly

I need to add attribute through a setup script.Attribute properties are working,but the frontend properties are not applied as specified in the setup script.For example, visible_on_front ...
blakcaps's user avatar
  • 1,965