All Questions

Filter by
Sorted by
Tagged with
28
votes
4answers
38k views

Confusion with order id, order increment id and I am not getting order id as 20001201

I am bit confused with order id and order increment id, So can any one help me to understand the difference between these two? I have an observer for sales_order_place_after where I store sales ...
28
votes
3answers
33k views

Delete custom EAV attributes from the database

I want to remove unused EAV attributes directly from the database before I move my store live. Attributes can be found in eav_attribute table, can I delete attributes from this table? Is it safe? Or ...
28
votes
4answers
8k views

Disabling modules - performance improvement?

This question has 2 parts: Does disabling core modules improve overall performance of the store and if so, do they need disabled in the admin (i.e. disable frontend output) or disabled via config.xml ...
28
votes
2answers
45k views

Magento2 : How to database schema upgrade

I am working on magento custom module, in module have Setup\InstallSchema.php file which is installed before. i have added some more database fields in InstallSchema.php so i want to update table ...
28
votes
3answers
10k views

Magento 2: Plugin vs Observer

In Magento 2, what are the pros and cons of using a plugin vs an observer to achieve something? I understand that observers are subscribed to events whereas plugins can jump in before and/or after a ...
28
votes
3answers
4k views

What is the difference between an Extension and a Module?

What is the difference between an Extension and a Module? Just curious to know that what is the right term to use when we extend Magento's functionality by creating our custom code in local folder.
28
votes
4answers
3k views

How to create a Marketplace ready Magento 2 extension

I have created a Magento 2 extension which I wanted to upload on Magento Marketplace. When I tried to upload my extension it got rejected multiple times with one or the other reason. Due to this and ...
28
votes
6answers
7k views

Magento security patch SUPEE-6482, What is patched?

Today 04.08.2015 there was a new security patch released, some colleagues and I were checking the patch, and is always nice to have some discussion about what changed, also does anyone know what are ...
28
votes
6answers
15k views

When to choose Magento Enterprise edition over Community edition?

Looking at the features of the Enterprise edition, I am wondering whether I should recommend it to clients. I have many years of experience with the community edition and have looked into the ...
28
votes
1answer
21k views

Which cron script is best to run? cron.php or cron.sh

Magento provides two cron scripts in its root directory, cron.php and cron.sh. Which one is the better to run and why?
28
votes
3answers
38k views

How to use Magento 1.9.1.0 Configurable Swatches in Default package theme (or a custom theme)?

UPDATE: My answer now supports automated change of the product base image after swatch. You can also find a more detailed tutorial on how to do this including more images here. Magento CE 1.9.1....
28
votes
2answers
330 views

What parts of the model layer can be bypassed in the interest of performance optimization

I'm currently seeing that for a database table with a very simple schema (about 5 fields), it's inserting new records at a rate of just under ~50 inserts / second, in my local development environment (...
28
votes
4answers
10k views

How to optimise database architecture for high volume sites?

Question is less about specific Mysql configuration items, but more about handling multiple databases, splitting read and writes to multiple database servers, master+master? Master+Multiple Slaves? ...
28
votes
6answers
15k views

Certified Professional Developer Exam reading material

Recently Magento announced Certified Professional Developer exam for Magento2. After reading in this page https://u.Magento.com/magento-2-certified-professional-developer I have some questions ...
28
votes
10answers
11k views

Magento 2: Fails to upload a transactional email logo from admin

I'm trying to change transactional email logo from. Admin > Content > Design > Configuration > Edit any record -> Transactional Emails It's on Magento 2.1 but logo showing broken image after ...
28
votes
7answers
24k views

Clear Theme/CSS Cache in Magento 2

When I am theming a Magento 2 store, what is the suggested way to clean the caches? I edit the .less files and then I currently do rm -rf pub/static/frontend/* var/view_preprocessed/ var/*cache/* ...
28
votes
1answer
5k views

Magento 2.1: using the entity manager

From 2.1 Magento has introduced Magento/Framework/Model/EntityManager I may be wrong here but from my understanding it is to replace Magento/Framework/Model/AbstractModel which was implementing the ...
28
votes
1answer
13k views

Mage_PageCache - External full page cache

So in Community Edition there is an option under System->Configuration->System->External Full Page Cache Settings that appears to be offering a full page cache using Zend Cache. When you set ...
27
votes
29answers
82k views

Magento 2 Error ERR_TOO_MANY_REDIRECTS

I'm new to Magento, after installation of Magento 2 community edition.I am not able to access the admin panel. I am getting below error. This web page has a redirect loop Error ...
27
votes
5answers
21k views

Get product attribute in cart in Magento2

I'm trying to grab a product attribute in the cart template. But I just does not work! The attribute is set to Visible on Catalog Pages on Storefront = yes and Used in Product Listing = yes I use a ...
27
votes
4answers
71k views

Magento 2 - How to get all items in cart?

At checkout page (chekout/cart) I want to edit the checkout button url destination based on cart items (link.phtml). How can I get all items in cart? I want to do this without using the API. Thanks.
27
votes
3answers
51k views

Error after magento upgrade

After firing this command in CLI php bin/magento setup:upgrade I am getting below error -: Fatal error: Uncaught exception 'Magento\Framework\Exception\LocalizedException' with message 'Can't ...
27
votes
4answers
33k views

Efficient get product url from id

What is the most efficient way of getting a product url given just it's ID? In a few places in our code we have things such as Mage::getModel('catalog/product')->load($id)->getProductUrl() in ...
27
votes
4answers
49k views

How to disable the cache for the block in Magento 2?

protected function _construct() { $this->addData( [ 'cache_lifetime' => false, 'cache_tags' => array('MY_BLOCK'), ] ...
27
votes
4answers
30k views

How to escape output data?

Is there a built-in Magento helper to escape outputted template data to prevent XSS? Or should I just use the PHP htmlspecialchars or htmlentities functions?
27
votes
4answers
12k views

Why do classes use a helper for translation instead of $this?

In core modules and sometimes templates, I see helper classes being used for translation: Mage::helper('someModule')->__('translate me'); Why is this preferable to: $this->__('translate me');
27
votes
5answers
10k views

Why does Magento have 3 code pools?

Magento has three code pools: community core local Core: It contains all Magento default modules Community and local: We use these code pools for our custom module development. Now I have doubt ...
27
votes
5answers
26k 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 ...
27
votes
3answers
18k views

New order email being sent twice

I'm using Magento 1.9.1 and when creating a new order, whether it's from the frontend or Admin, the system is sending out 2 emails - both the same! I've looked on the net and found a bug which was an ...
27
votes
6answers
123k views

Add static cms block in home page

I have read different tuts about this and some say it all can be done from the admin panel, others say I have to add code in my layout and in the template files. Well, nothing works... I created the ...
27
votes
2answers
75k views

Left join a table on a collection query

I am doing the following to get some orders out of the system for export: $orders = Mage::getModel('sales/order')->getCollection() ->addFieldToFilter('status', $statusToExport) ->...
27
votes
4answers
43k views

Upgrade script - Create new select attribute with options

I would like to create a new product attribute with some predefined options using an upgrade script. I have an upgrade script working, so the only thing i dont know how to do is to add the drop down ...
27
votes
3answers
59k views

Correct way to change the magento 1.9 admin url

Correct way to change the Magento 1.9 admin url anyone can provide me the correct way. I see a lot of different suggestion online.
27
votes
4answers
17k views

Clear All URL Rewrites - Enterprise (1.13)

After several messed up imports, I've been left with a load of URL rewrites that I need to remove. I'm running Enterprise 1.13 When I've had this problem in community, I've simply truncated ...
27
votes
3answers
1k views

Magento Security Punch list

It is very often that we take a site from another firm and now we are stuck with a conglomeration of code and potentially dozens of people who have worked on a site. I am looking for a punch list of ...
27
votes
2answers
15k views

Magento2 translating Javascript (KO) template text

I am trying to add a translation for the text <!-- ko i18n: 'Store credit available' --><!-- /ko --> present in vendor/magento/module-customer-balance/view/frontend/web/template/payment/...
27
votes
4answers
3k views

Returning $this after observer

I see some conflicting information on the internet and in 3rd party modules alike - is it a requirement or best practice to return $this at the end of an observer method? E.g.: ...
27
votes
4answers
27k views

Magento 2 - Create order using REST API

I need to use the Magento REST API to create an order from a mobile client. In my case, mobile side will implement the payment directly using PayPal SDK. What I need to do is to create an order by ...
27
votes
1answer
110k views

Mage::getBaseUrl() vs Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)

Is there a reason to use Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) rather than Mage::getBaseUrl()? I've seen both in use, and they both return the same thing. Is the longer one redundant? ...
27
votes
8answers
30k views

Cart dropping all items / cart session clears

A site I manage suddenly (potentially 2 weeks ago - from GA stats, and only reported now) started dropping the cart items when you view the cart, or go to checkout. The top 'mini-cart' shows the ...
27
votes
14answers
36k views

Magento 2 running so slow on localhost development

I recently started developing on magento2 new extensions or customizations, and my first impression was a nightmare. I have to wait about 20-30s for every change I make? really? I'm talking about ...
27
votes
4answers
33k views

How to avoid 404 error on new extension installation

It is a very common error that shows in Magento when you install a new extension with system.xml config: When you go to the System->Configuration->Extension tab, a 404 error is shown. You need ...
27
votes
4answers
8k views

What is the status of rounding issues in 1.7?

We are using Magento CE 1.7 and have various rounding issues. In various calculations there is a 0,01 EUR difference. The basic issue might be that the article-prices are incl. tax. Co-programmers ...
26
votes
11answers
33k views

How to disable Magento 2 reviews

I'm trying to disable the Magento 2 product reviews feature. I tried Disabling the Module at the Magento 2 admin Stores\Advanced\Advanced\Magento_Review but the reviews tab on each product is still ...
26
votes
9answers
69k views

Magento 2: Get product attribute’s select option id,label for configurable product

How to get an option value based on the option id in Magento, or get an option id based on the option code ? Example: how to get the color attribute option id 10 from the label "Red", and get the ...
26
votes
7answers
59k views

Magento 2: Call a static block using xml

How i include a static block in a page using xml. For example i created a static block with identifier promo. In magento 1 we include a static block using below code <block type="cms/block" ...
26
votes
7answers
23k views

Admin config error: Undefined index: id in Iterator.php on line 59

Can someone please explain this error to me? Exception #0 (Exception): Notice: Undefined index: id in /home/staging/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 59 ...
26
votes
10answers
18k views

How to get Magento version in Magento2 ? (Equivalent of Mage::getVersion())

How do I get the Magento version in Magento2.x (e.g. 2.0.0) ? In Magento1.x, I could do it with Mage::getVersion() So what's the equivalent in Magento2.x ?
26
votes
4answers
20k views

How to override a HTML file using a custom module?

I'm developing a custom module for payment method in Magento 2. Currently, I'm using cc-form.html from vendor directory and module working fine. See below path: vendor/magento/module-payment/view/...
26
votes
4answers
35k views

How to remove SID from URL?

I have installed Magento 1.9 on domain say abc.com and created a new website having URL xyz.abc.com from admin System -> Manage Stores Now what I have done is created a new sub domain xyz.abc....

15 30 50 per page
1
3 4
5
6 7
2148