Showing ideas with status New.
Show all ideas
Feature request from markoshust, posted on GitHub Dec 09, 2015
After sending tracking number information for a shipment to a customer, it should log that the tracking information was emailed to the customer below the Submit Comment button just like a standard shipping history record.
... View more
Feature request from mage2pro, posted on GitHub Dec 25, 2015
https://github.com/oyejorge/less.php#source-maps
... View more
Feature request from mttjohnson, posted on GitHub Dec 14, 2015
I've been digging into how logging works in Magento in order to accommodate adding logging into a module I'm working on.
It looks like there is a little bit of discussion on #2641 regarding how to improve the usability of logging in Magento.
I logged an issue #2529 that identifies a problem with Magento's use of Monolog with multiple handlers specified in di.xml. I provided a workaround to utilize multiple handlers with Monolog 1.16.0 to make it possible to specify multiple handlers in the di.xml so that Monolog recognizes them correctly. I also noted that the fix to Monolog that allows it to handle associative arrays properly would cause some duplicate logging the way that Magento has implemented the use of logging.
A few other people like #2058 have run into some of the difficulty in figuring out how to utilize logging in Magento or work around it.
I had the need for some logging in a module I'm working on, and I implemented a custom Logger that extends Monolog\Logger and then I inject an instance my logger using DI into any class that I want to utilize the custom logger, in a similar way to how Magento injects Psr\Log\LoggerInterface for any class that needs access to log information. The custom logger extends Monolog\Logger but doesn't add anything to the implementation, I basically utilize the class so I can specify it's type in di.xml with an array of handlers and processors to instantiate the object with similar to how Magento is using Monolog.
I wanted to have some control to turn off logging, or specify in the Magento Admin Configuration what level of detail to log. I added some code to the handler constructor to conditionally add a custom processor to my handler that includes the store_id in the log record if I have configuration settings set to log a lot of additional details to the log records. I implemented a custom handler that extends the Magento\Framework\Logger\Handler\System hander and I overwrote the isHandling() method to check config settings and determine if it should be logging information or not. I also overwrote the write() method to check config settings and conditionally alter the amount of additional context details to include in the log record that is written.
I also had certain log messages that I was wanting to log to both a database table and to a log file. I wrote a separate custom handler for writing log records to a database table using a simple custom Model in my module. This way I can have structured information logged to a table when an event occurs and have other pieces of code interact with that event information rather than the information getting burried into a log file.
The way I implemented the use of my custom logger, I pass additional details across via the context array and my handlers will either include or exclude certain context keys into the log records depending on the level of detail the configuration settings specify.
$this->myCustomLogger->info(
'response from external web api call',
[ /* context */
'request' => var_export($request, true),
'response' => var_export($response, true),
'processing_time' = var_export($processingTime, true),
]
);
$this->myCustomLogger->info(
'decision was programmatically determined',
[ /* context */
'input' => var_export($input, true),
'event_circumstances' => var_export($whatHappened, true),
'action_taken' = var_export($howItWasResolved, true),
'manual_adjustment_needed' = var_export($detailsOfManualAdjustmentToBeMadeLater, true),
]
);
I figure that during development and testing of my module, the logging details will be useful, but during production we would want to keep logging to a minimum of necessary details. The additional context data gives me relevant information to try and diagnose a situation when the module is deployed somewhere, and there is the ability to control if it is logging, where, and how much detail it logs based on configuration settings in the admin. In the event that some issue is occurring with the module in production, additional details could be logged temporarily to collect more details to better diagnose and analyze an issue to isolate it.
Having two custom handlers for my custom logger allows me to have one log entry anywhere my code needs to log something, and I can control how I want the handlers to process the log records via configuration settings in the admin. If for some reason I wanted to add a third handler for something like Loggly to aggregate log details somewhere else it would be pretty simple to add to my custom logger.
Being able to use Monolog and implement additional logic in the handlers allows me to control the logging more specifically and seems to work well, but I'm basically doing almost all of this outside of anything built into Magento for logging.
I don't see anything in Magento that allows me to control logging much, if it writes logs, where it writes, or how much it logs. It looks like out of the box it is set to always log everything to files whenever the logger is called to write a record.
It seems like there should be some kind of allowance for managing different loggers in Magento, and each logger have it's own set of handlers and processors. I wouldn't want my custom handlers trying to process or filter out logging events throughout the rest of Magento, or even some other custom 3rd party module. Monolog has the ability to identify different loggers by the logger's name which is also referred to as a channel. Symfony appears to use channels to organize multiple loggers and provide a relationship to the part of the application being logged. The separate loggers can share the same handler that writes to a file, but each logger has the option to specify their own file path. Some loggers may write to the same file, but other could write to a separate file. Organizing and managing multiple loggers would allow a lot more flexibility in Magento so that as a module developer I could add my own logger to some manager and specify a few things in my custom logger to have it control if, when, and what it should be logging, and where.
Instead of having separate handlers for writing System, Debug, Exception logs, you could have separate loggers each with their own channel/name for System, Debug, and Exception logs. Each logger could manage what handlers it uses to write the log files, and pass into each handler details like where it is supposed to write. If you wanted to aggregate logs centrally, you can just add an additional handler to each logger that will write/forward log records to the aggregator. Treating a handler more like a generic type of how things are getting written would probably be more flexible than having separate handlers for each file getting logged. Monolog is expecting to iterate through all handlers in the logger's list until a handler specifies that it shouldn't bubble the record onto the next handler in the list.
I'm still struggling with wrapping my head around how to deal with adhering to the simplicity and common implementation of PSR-3 and having a bit more control organizing logs together in related groups (channel) so that each group can have additional control or processing based on the group. If Magento was managing multiple loggers for us, how would we specify which logger gets instantiated and passed into a class as an implementation of Psr\Log\LoggerInterface or should something else be passed in that gives us the ability to specify which logger/channel we want, and that object delivers us the Psr\Log\LoggerInterface implementation that we log against? Is it important that we inject Psr\Log\LoggerInterface into our class for PSR-3, or is it merely important that any log activity be against an implementation of Psr\Log\LoggerInterface allowing for the use of multiple implementations of Psr\Log\LoggerInterface to manage the organization and grouping of various log activity?
... View more
Feature request from HirokazuNishi, posted on GitHub May 06, 2015
Magento1.x only uses "round" for tax and decimal number method, but sometimes it causes wrong result.
Also some merchants use "floor" and "ceil" for discarding decimal numbers.
Is it possible to choose decimal discarding method via admin panel for M2?
If we do simply discard decimal numbers, converting currencies causes serious trouble.
For example, 99.99USD is 11,961.15JPY ( 1USD is 119.6235JPY ), but JPY does not use under decimal number. Then correct result is 11,961 JPY.
If "round" is used for discarding method, sometimes converting result is not correct.
... View more
Feature request from seansan, posted on GitHub Mar 17, 2015
Change the setting Add Store Code to Urls from global setting to Store Name setting
Currrently the setting Add Store Code to Urls is a global setting. This should be changed to one level down: Store Name level.
One should be able to run 2 brands like this
Brand A
Add Store Code to Urls = YES
nl site = brandA.com/nl
en site = brandA.com/en
Brand B
Add Store Code to Urls = NO
And different Base URL's
nl site = brandB.nl
en site = brandB.co.uk
Curerntly when Add Store Code to Urls = YES the /en, /de, /fr, /nl are added to all stores in a multistore setting. In this example brand A follows this model, but Brand B does not and has unique domains
Please change Add Store Code to Urls to Store Name level (instead of global setting).
Some more explanation here: http://magento.stackexchange.com/questions/60686/multi-multistore-multiple-brands-multiple-languages-setting-store-view-code
... View more
Feature request from Flyingmana, posted on GitHub Oct 12, 2015
To make debugging cronjobs a lot easier, it would be great if I can execute them directly via CLI
... View more
Feature request from markoshust, posted on GitHub Aug 10, 2015
I understand this may be kept for legacy purposes, but this section lacks meaning. The Advanced>Advanced section should really be renamed "Module Output" or similar.
... View more
Feature request from kassner, posted on GitHub Nov 16, 2015
Hi,
On the new Credit Memo form, the field Grand total is not updated when you change any value in the Refund totals block.
In the image above, please note that the Grand total is $20.00, even though the Subtotal is $10.00 and the fields below are $0.00. When you change any of those fields, the Grand total is not updated.
Thanks!
... View more
Feature request from tkn98, posted on GitHub Jul 06, 2016
Steps to reproduce
Install Magento from develop branch.
After all Modules are installed, a message is shown in green letters on the last line. Read that message.
The message says:
Please re-run Magento compile command
It can be greatly improved by removing the inaccuracy as there is no such command named " compile ". The command name is " setup:di:compile ".
This should be trivial to fix.
... View more
Feature request from leoquijano, posted on GitHub May 18, 2016
While implementing a custom theme using Magento 2, I found out that there's currently no support for easy customization of Add to Cart message texts.
In the Magento\Checkout\Controller\Cart\Add class, the following method is called to add a product to the cart:
/**
* Add product to shopping cart action
*
* @return \Magento\Framework\Controller\Result\Redirect
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
public function execute()
{
if (!$this->_formKeyValidator->validate($this->getRequest())) {
return $this->resultRedirectFactory->create()->setPath('*/*/');
}
$params = $this->getRequest()->getParams();
try {
if (isset($params['qty'])) {
$filter = new \Zend_Filter_LocalizedToNormalized(
['locale' => $this->_objectManager->get('Magento\Framework\Locale\ResolverInterface')->getLocale()]
);
$params['qty'] = $filter->filter($params['qty']);
}
$product = $this->_initProduct();
$related = $this->getRequest()->getParam('related_product');
/**
* Check product availability
*/
if (!$product) {
return $this->goBack();
}
$this->cart->addProduct($product, $params);
if (!empty($related)) {
$this->cart->addProductsByIds(explode(',', $related));
}
$this->cart->save();
/**
* @todo remove wishlist observer \Magento\Wishlist\Observer\AddToCart
*/
$this->_eventManager->dispatch(
'checkout_cart_add_product_complete',
['product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse()]
);
if (!$this->_checkoutSession->getNoCartRedirect(true)) {
if (!$this->cart->getQuote()->getHasError()) {
$message = __(
'You added %1 to your shopping cart.',
$product->getName()
);
$this->messageManager->addSuccessMessage($message);
}
return $this->goBack(null, $product);
}
} catch (\Magento\Framework\Exception\LocalizedException $e) {
if ($this->_checkoutSession->getUseNotice(true)) {
$this->messageManager->addNotice(
$this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($e->getMessage())
);
} else {
$messages = array_unique(explode("\n", $e->getMessage()));
foreach ($messages as $message) {
$this->messageManager->addError(
$this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($message)
);
}
}
$url = $this->_checkoutSession->getRedirectUrl(true);
if (!$url) {
$cartUrl = $this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl();
$url = $this->_redirect->getRedirectUrl($cartUrl);
}
return $this->goBack($url);
} catch (\Exception $e) {
$this->messageManager->addException($e, __('We can\'t add this item to your shopping cart right now.'));
$this->_objectManager->get('Psr\Log\LoggerInterface')->critical($e);
return $this->goBack();
}
}
It can be seen here two particular places where messages are hardwired. The first one is the success message:
$message = __(
'You added %1 to your shopping cart.',
$product->getName()
);
$this->messageManager->addSuccessMessage($message);
The second one is the error message:
} catch (\Exception $e) {
$this->messageManager->addException($e, __('We can\'t add this item to your shopping cart right now.'));
$this->_objectManager->get('Psr\Log\LoggerInterface')->critical($e);
return $this->goBack();
}
Some websites require different copy for the Add to Cart behavior (both for success and error messages), so ideally theme developers should be able to customize that behavior. While the optimal approach would be to configure this in layout or template files, I think that a relatively simple solution is refactoring the Controller code, like this:
if (!$this->cart->getQuote()->getHasError()) {
$message = $this->getSuccessMessage($product);
$this->messageManager->addSuccessMessage($message);
}
} catch (\Exception $e) {
$this->messageManager->addException($e, $this->getErrorMessage());
$this->_objectManager->get('Psr\Log\LoggerInterface')->critical($e);
return $this->goBack();
}
/**
* Gets the message used when a product is successfully added to the cart.
* @param $product
* @return \Magento\Framework\Phrase
*/
protected function getSuccessMessage($product)
{
return __(
'You added %1 to your shopping cart.',
$product->getName()
);
}
/**
* Gets the message used when there's a problem adding an item to the cart.
* @return \Magento\Framework\Phrase
*/
protected function getErrorMessage()
{
return __('We can\'t add this item to your shopping cart right now.');
}
This would allow theme developers to override this controller without overriding the main execute method, which can be risky and has a higher maintenance cost.
... View more
Feature request from maderlock, posted on GitHub Jul 22, 2016
Surprisingly, given the proliferation of files in the checkout's frontend interface, it's hard to insert new blocks. Taking the shipping step as an example, the only options are points already specified within the single shipping template that outputs the shipping address form, shipping method form and the next button. Therefore while you can insert content within the shipping method block (as that's where the insert points are), there's no way of adding an extra block before shipping, between shipping and shipping method or between the methods and the buttons.
This is very limiting for anyone wanting to customise the checkout. My recommendation for improvement would be to split this current template into three - shipping address, shipping method, and buttons. Then layout can be used to insert extra content without having to override a single large template.
... View more
Feature request from minhluan259, posted on GitHub Jun 16, 2016
pub/static/frontend/Magento/luma/en_US/jquery/jquery.cookie.js
Jquery cookie in magento 2.1 is old version (v1.1). It hasn't function $.removeCookie .
Please update to jquery cookie v1.4.1
https://github.com/carhartl/jquery-cookie/blob/master/src/jquery.cookie.js
... View more
Feature request from nextend, posted on GitHub Jun 10, 2016
It would be great if you could add extend the setup:di:compile command with hooks to be able to exclude specific directories in our extensions. My extension is a crossplatform application and the compiler always fails as it uses custom autoloader and lot of special things. With the current Magento 2 compiler I can not release it.
As far as I see the test folders excluded only and there is no hooks anywhere to intercept the excludes and place mine in place.
Related stackexchange question: http://magento.stackexchange.com/questions/119967/magento2-custom-autoloader
... View more
Feature request from loomdecor, posted on GitHub Jun 23, 2016
In magento 1, you could move multiple categories at one time - which I can't seem to do anymore.
Also every time I move a category I get a warning message. I get it - it takes a long time. But it takes even longer if I have to close it all the time. This should be something where I can say "don't show me again"
... View more
Feature request from webartistse, posted on GitHub Jun 29, 2016
Steps to reproduce
System > Export
Entity Type > products
Several configs to somehow export useful data
Expected result
Select what products I want
Deselect some columns
Export as Excel XML
Support for saving a filter option set.
Actual result
Total mess of everything
This export function is not even useful in any way
We have 4 stores but same product catalog. We have config prouct with variants. In export file every product appear 4 times. One row is store blank but seems to have all info. 3 other rows has many empty fields but same SKU as the first one.
This exclude thing is all wrong. Lets say I want to export all product for a specific store. Its not possible. I tried to exclude products thats missing info in some fields since its duplicates but export does not apply the exclude filter if the field is empty. Tried many many ways in 30 minutes without any luck with something useful.
Using Magento 2.0.7
... View more
Feature request from nyov, posted on GitHub Nov 29, 2015
Is it possible to do the equivalent of the System->Import and System->Export screens from the 'magento cli' commandline?
Having at least the Importers available from the commandline would be a very big boon (without going through the requests-heavy rest or soap api).
... View more
Feature request from seansan, posted on GitHub Aug 24, 2016
Currently it is not possible to create 1 configurable product in a "pack" or "bundle" (from now on: pack) where the pack is seen as one pack and not individual items.
Our request in short: please expand stock control and allow for an attribute "qty in pack" which defaults to 1 piece but can be altered. Any product can be created just like you normally would with own title, sku, price, uri, meta etc... the only difference is that when the field "qty in pack" is populated and larger than 1, that when the product is sold or returned the stock movement is multiplied by "qty in pack"
I've seen this question been asked in a multitude of ways on forums and Stackexchange.
The major element to understand is that one wants to create a new standalone configurable prodcuts (say a T-shirt) where a customer would just like normal select the size and the qty and click add to cart. Only if the product was created as "pack" and the title of the product is "6 pack t-shirts" and the image shows 6 T-shirts etc.etc.: then one would still have to see QTY =1 on the frontend (because we are buying 1 pack) but the backend should now that it should register 6*qty (=6 in this example) when changing the underlying simple products stock
More details and uses cases can be found here: http://magento.stackexchange.com/questions/111799/magento-products-packs-assortiment-with-size-and-stock-control-like-3-pack-o
... View more
Feature request from markoshust, posted on GitHub Dec 09, 2015
No place to find out when the shipment took place from the shipping detail page:
It should show the same date on other tabs/list views as so:
... View more
Feature request from scholtz, posted on GitHub Feb 01, 2016
Hi, it would be cool, if someone could setup the shop using the command line. For example to set the other language, someone would need just this code to run on command line:
composer config repositories.atconnect composer https://connect20.aveo-trade.cz
composer require atconnect/magento-two-language-de-de:2.*
php bin/magento setup:store-view:new "Main Website Store" DE de 1 1
php bin/magento setup:store-view:edit setLang de_DE
I know that setup:store-view: does not exists, so please give to this post label "improvement" or "feature request"
Thanks
... View more
Feature request from stasleo, posted on GitHub Feb 29, 2016
I don't like UX of Magento 2 grids.
1) To find some product I need to do the following:
click on "filters"
find Name input and fill in
click on "apply filters" button ("enter" does not submit form)
Why there is no "search by keyword" input (like in Customers or CMS Pages grid)?
https://s.mail.ru/2vjLSwe7zM5x/img-2016-02-29-11-46-30.png
2) Where there is no inline editor in the Product Grid (like in Customers or CMS Pages grid)?
3) Why grids display mass-action dropdown even if nothing selected? I think it would better to display mass-action dropdown in some pop-over in floating position, and only if some items are selected. It would make grid pages cleaner and easier to use.
4) There is no need to display pagination block if there is no need to. For example, if I have <20 items, pagination can be hidden.
5) Bookmarks should be always visible and accessible at just one click.
6) It should also be possible to change the order of bookmarks.
7) Our developers said that new magento grids are complicated to customize. It is difficult to make cell value a link or apply some CSS to a cell.
... View more