Questions tagged [magento-1]

General questions about Magento 1 not specific to a minor version. You can use it to distinguish from Magento 2, but if you have issues with a specific installation, use the appropriate magento-1.x tag instead.

Filter by
Sorted by
Tagged with
7
votes
5answers
35k views

Filter product collection by multiple categories?

I have this snippet of code that gets the most recently added products: $_productCollection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToSelect('*') ...
7
votes
3answers
13k views

Find Category by ID in Magento Backend

How can I find a category by its ID in the magento backend?
7
votes
4answers
36k views

How to get current store id from current scope in admin

How do I get the store id of the current scoped store in the admin? For instance, if I use the drop down box in the upper left hand corner, and change the scope to a store view, how would I get the ...
7
votes
3answers
13k views

How to add multiple flat rate shipping

I am not sure if I need table rates here, but what I need to establish is 3 shipping costs per order, to UK only... Essentially, £2.95 (3-5 days) £4.95 (1-3 days) Order over £50, free delivery I ...
7
votes
5answers
13k views

displaying certain payment methods for customer groups

I am very new to the magento checkout process so forgive my lack of knowledge. Is there a way of displaying certain payment options for certain customer groups. For example i have changed the "...
7
votes
2answers
2k views

Does it make any difference whether I declare my <observers> inside <global>, <frontend> , <default>, <admin>, <adminthtml>?

At the surface, all seem to work. Are there any less obvious implications/consequences of choosing one over the other?
7
votes
6answers
20k views

Is there a way to export all categories into a csv?

Is there a way to export all categories into a csv? Im moving data from a non-magento store into a fresh build.
7
votes
3answers
24k views

How do i call a controller function in ajax?

This is the content of my .../template/exportdb/attributes.phtml file: <span id = "attributes">Generate</span> <script type="text/javascript"> jQuery(function () { ...
7
votes
4answers
12k views

How to add item to Magento collection to the beginning?

It is possible to add element to the collection as the first element, similar to this method which adds element to the end? $product = Mage::getModel('catalog/product')->load(15879); $...
7
votes
3answers
4k views

Magento cookie bug with WebKit based browsers

There is a reasonably common & well documented cookie-related bug/issue with Magento and Chrome (looking at the others' issues - possibly WebKit and IE at times). Whether this is due to a common ...
7
votes
1answer
524 views

Should I always inherit from Mage_Core_Helper_Abstract?

I heard conflicts opinions about weather or not one should only inherit from Mage_Core_Helper_Abstract, even when none of the helper built-ins are used. So if I have couple of helper classes that I ...
7
votes
3answers
3k views

Sitemap.xml change home

On our Magento store the sitemap which Magento automatically generates from the admin panel at Catalog > Google Sitemap adds the home url to our homepage like: <url> <loc>http://our-...
7
votes
2answers
6k views

Magento 1 : how to override/rewrite a core controller class?

Note: This is intended as a canonical question that fully explains how controller rewrites work and can be used as duplicate target for more specific "How do I override controller X" or "Why does my ...
7
votes
4answers
18k views

How do I configure Robots.txt in Magento?

I'm trying to setting up de robots.txt on our Magento store. Actually, I have no idea of the best way to set up the robots.txt.
7
votes
4answers
2k views

Keeping module compatible for different Magento versions

Today, I am running into the following problem: A module I developed works very well in a Magento 1.7 version store. Now, I need to adapt it to also work with a Magento 1.5 store. One point at which ...
7
votes
1answer
24k views

In which database table are products and categories coupled

Each product can be assigned to a category. I was wondering in which database table these products and categories are coupled.
7
votes
2answers
4k views

dynamic key => value pair adminhtml setting for custom module

I have a custom module with adminhtml setting (system.xml), which allows the the user to assign a unique "code" to a specific shipping method. It looks something like this: As you can see, this is ...
7
votes
4answers
1k views

How to add a custom page with cross-sell products

You wouldn't believe how much time I've spent researching/trying to make this happen. All I want is to have an extra page come up in the order process after the product page asking the customer which ...
7
votes
1answer
4k views

Set default value to custom attribute for all products

I have created the custom attribute (test) for products as a text field with default value('test') from admin panel And assigned that attribute to default attribute set. Now I can able to see the ...
7
votes
3answers
4k views

Developer mode on production environment

I was recently contacted by a client to evaluate their Magento store. I realized that the store (even though running in production) had developer mode enabled in their index.php file: if (isset($...
7
votes
5answers
8k views

Disable Flash uploader in Magento

Are there any reliable ways of disabling the Flash uploader and using the 'classic' uploader? Is this even possible without using an extension? I'm just normally trying to upload an image via the ...
7
votes
3answers
10k views

Notification, sudden error: Warning: include(): Filename cannot be empty

Since this evening we are seeing this error. First we see this in error log 2013-08-11T18:46:59+00:00 ERR (3): Warning: include(): Filename cannot be empty in app/code/core/Mage/Core/Block/...
7
votes
2answers
1k views

Magento 1: purpose of Magento index tables vs MySQL indexes

I've been working with Magento for years and I feel like this is a stupid question but anyway, I feel like I need some clarifications. As you may know, Magento 1 comes with several index tables such ...
7
votes
3answers
2k views

What could cause error related to “dashboard/tunnel/key”

There is below information in the log, but no idea what could cause this :( a:5:{i:0;s:45:"Unable to read response, or response is empty"; i:1;s:1003:"#0 lib/Varien/Http/Client.php(61): ...
7
votes
3answers
314 views

How can I properly add additional columns to the sales order grid?

Is there a way (or several ways) to add additional columns to the sales order grid which one sees in the admin area?
7
votes
1answer
164 views

Good practice regarding core tables relations with modules tables

This a question regarding Magento development, it can apply for both M1 and M2. For the last weeks, I've been working on several modules that are directly related to native Magento entities/database ...
7
votes
3answers
1k views

What is the correct way to override / replace the custom options container?

Background I am developing a module that creates a few custom entities which relate/impact the options available for a particular product. Here's how it works: When a product loads, a query is ...
7
votes
1answer
2k views

How to use Modules installed with Composer and Firegento in my Magento installation

This is a super basic Magento/Composer question — how are users (i.e. me) supposed to make a Magento system aware of packages installed via composer/firegento? That is — most of the tutorials I've ...
7
votes
1answer
778 views

Change the template inheritance hierarchy

Is there a way to change the template/skin inheritance hierarchy? Currently you can have: custompackage/customtheme custompackage/default base/default Is there a way or a module that would ...
7
votes
1answer
263 views

Impact of Google Chrome blocking Flash at the end of the year

As some of you may know Google Chrome will start blocking Flash in December I know that the backend uploaded of M1 is using Flash. What is the impact of no flash for Magento ? What other features ...
7
votes
1answer
863 views

Show different number of products in category page

I am trying to show different number of products in category but it is only working on page 1. I want to show 22 products on page1 and rest all the pages 20 products per page. I managed to change by ...
7
votes
2answers
860 views

Custom Session Variable Not Saving

I'm having an issue with session variables saving after a redirect. Here's a mock of the relevant code: class Company_X_Model_Session extends Mage_Core_Model_Session_Abstract { const KEY_QUOTE = ...
7
votes
2answers
921 views

Product preview button in manage product page

I want to implement product preview button on manage products page,before saving the products so admin have some idea how products are looking in frontend, there are extension available for doing this,...
7
votes
1answer
2k views

Get product position from category

I'm implementing Prev/Next button on Product view page following Inchoo's Blog. It's working fine with Default Magento Theme but in My theme there is an issue with getting product position from ...
7
votes
2answers
1k views

Get empty result when trying to get filterable attribute for particular category

I need to retrieve all filterable attributes for category. I'm using that snippet: $category = Mage::getModel('catalog/category')->load($categoryId); $layer = Mage::getModel('catalog/layer'); $...
7
votes
1answer
2k views

Custom /catalogsearch/ filters

Beforehand I have to tell: I'm a total n00b on Magento and what I need to know is more a "common practice" or "standard" about how is something achieved in Magento, since I have to maintain (in record ...
6
votes
3answers
42k views

Get attribute value in product view page

I want to to display attribute value in Product view page. link I'm trying following code : echo $_attribute->getProductAttribute()->getAttributeCode(); or $_attribute_code = Mage::getModel('...
6
votes
3answers
23k views

Display more items per row in products/category pages

I am trying to display more products on a single row. I don't know where I could do that? For now, it displays only 3 products per row and there is a lot of empty space. I would like to display 5 ...
6
votes
5answers
10k views

Notice: Trying to get property of non-object

Huge error as soon as I try to view any page on my magento site now displays: Notice: Trying to get property of non-object in /httpdocs/app/code/core/Mage/Core/Model/Config.php on line 1227 app/...
6
votes
1answer
5k views

complete flow of a magento

I want to know the complete flow of a magento view. Suppose i am viewing the home page, can I ask how the flow of control goes through the PHTML, XML and PHP files , in order to view the home page? ...
6
votes
1answer
660 views

Magento 1: layout action tag best practice

While studying for the Frontend Certification, I noticed a new thing I never came accross. Basically when I want to use the <action> tag, let's say to change the template of a block, I'm used ...
6
votes
2answers
16k views

How to empty cart or clear session “externally”

I have a unique workflow for redeeming vouchers on our site through Magento. I have a form that users use for inputting a series of vouchers to get products. It isn't "in" Magento as a CMS page or ...
6
votes
2answers
3k views

How does magento create bundle option selections?

I've been looking at programmatically creating bundle products, and got stuck on adding a selection to the options. The problem is that when you create a new selection (Mage_Bundle_Model_Selection) ...
6
votes
3answers
3k views

Magento CatalogSearch Model Problem - Unable to use loadByQueryText();

I am writing a custom module, and in this module I need to add a search query to the database if it's not there already. I figured out what I need to do: Load catalogsearch/query model Check if query ...
6
votes
1answer
145 views

Usage of superfluous (and potentially dangerous) standard code in installer scripts

I always thought it's some kind of epidemic plague that users behave in a high risk manner introducing $installer->startSetup() and $installer->stopSetup() calls in installer scripts. Many of ...
6
votes
3answers
3k views

Disable admin or frontend route

Is there a way to disable an admin route, well actually any route. The use case is I have an extension that comes with a frontend section and an admin section but I do not want the admin section to be ...
6
votes
4answers
4k views

Update customer gender translations

I would like to translate the gender options for a customer. At first I thought that I could simply use a translation file for this, but looking into the template app/design/frontend/base/default/...
6
votes
2answers
7k views

Restrict system.log logging to particular error level?

By default Magento logs notices, warnings and errors into the system.log file. Is it possible to restrict the log level so that Magento doesn't log PHP notices? Magento's Mage::log() method offers ...
6
votes
2answers
3k views

Order Item get price of selected custom option

I've in my order a simple product with a custom option of type radio for choose Product price 100 () no installation service (*) yes install it + 50 € Now I'm exporting my order to an ERP product ...
6
votes
2answers
17k views

Programmatically set free shipping from an observer

I am programming a module where I need to set shipping to be free of charge if certain conditions are satisfied. These conditions are very specific and cannot be modelled using "Shopping cart price ...