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

Magento 1: Use of <![CDATA in the system configuration XML

I've noticed that some comments in the native Magento 1 system.xml files are enclosed by <![CDATA[ / ]]> tags and some are not. For example in app/code/core/Mage/Captcha/etc/system.xml we have: ...
6
votes
1answer
5k views

How do I sort Magento products in a specific category according to my order

I want to sort Magento products on a list page for a specific category according to my given order. Can I have a text field in each product and give any number and my products in that specific ...
6
votes
1answer
1k views

Magento 1: using Mage::objects() to cache models

So I found out that in theory, Mage::objects() could be used to cache objects via Varien_Object_Cache. I noticed that if I run the following: // Test #1 for ($i = 0; $i < 100000; $i++) { $...
6
votes
2answers
4k views

Get Website ID from Website Name

As the title says. I don't want the ID of the current website, I want the ID of any website by supplying only that websites name. I have this code: $siteModel = Mage::getResourceModel( 'core/...
6
votes
3answers
792 views

Avoid conflicts in setup scripts with multiple developers

We are using Magento setup scripts located in the sql and data directories to propagate data changes to all working copies and environments. This includes configuration settings, creation of new ...
6
votes
3answers
1k views

Magento getFirstItem and getLastItem not working on collection

My code is as below but it won't work with loading first or last item. $shipidarr[0] = 100007536; $shipModel = Mage::getModel('orderstatus/orderstatus')->getCollection(); $shipModel->...
6
votes
2answers
958 views

Setting data in a multi dimensional array

All classes that extend Varien_Object in Magento 1 and Magento\Framework\Object in Magento 2 have a method called getData. All of us used it. If the $_data member var is a multidimensional array we ...
6
votes
2answers
726 views

Custom Entity Models - Using EAV vs Flat

I am working on a module that is essentially replacing a number of Magento features with custom logic. This is mainly due to the fact that I require pricing to 5 decimals of precision, but that is ...
6
votes
4answers
2k views

Input type image validation in add field in admin grid custom module

How to make the add field for image in custom module admin grid as required entry? The following is the way i have given , but it is not taking as required - entry field while saving. $fieldset->...
6
votes
1answer
8k views

vertical menu every page & Header menu navigation

I am trying to customize header menu and vertical menu (left menu) in Magento cms When i click on the category, i will be redirected to next page but the complete list of categories is no more ...
6
votes
1answer
9k views

Get Shopping cart rule coupon code

I have made two simple shopping cart rules from backend. The first has action which is based 'SKU is one of'. The second has action based on 'Brand contains'. I have made a custom function to ...
6
votes
3answers
7k views

How do I create a configurable product with associated products?

The following code does create a configurable product, however, when I open the product in the backend, the following message appears: when I create the configurable product and open it in the ...
6
votes
1answer
2k views

SOLVED: new Unserialize_Parser class throws exceptions on NULL values

I had a real problem with SUPEE-8788 related to the decision to replace PHP's unserialize() function with the new Unserialize_Parser. The problem is that the Gene_Braintree payment extension sets NULL ...
6
votes
2answers
4k views

Add datepicker on frontend?

We have developed a custom module for appointment. We need to get date of the appointment. We have added the below code in my custom page xml and phtml files In XML file: <reference name="head"&...
6
votes
1answer
91 views

Which license should I use for my own extension to prevent others to use it without my permission/paying?

I developed a few extensions and I try to figure out which license I should use to "prevent" others e.g. our agencies to copy them and spread them to their own customers w/o my permission.
6
votes
0answers
114 views

Inconsistent package.xml - Magento 1

I tried finding a Slack or Discord server for Magento before coming here. I am trying to submit a Magento 1 extension for technical review @ marketplace and the package.xml won't pass marketplace ...
6
votes
0answers
711 views

Magento : Validate Product against shopping cart rule

I have a Shopping cart rule which applies to a particular category with some discount. I have a situation wherein I want to validate product against this rule whether this rule can be applied to that ...
6
votes
2answers
1k views

New website/store view, all pages 404 (including homepage)

As per the title, I've set up a new store on a different domain and all pages including the home page are returning 404. I've tried pretty much everything, and I'm wondering if any of you can think ...
6
votes
2answers
2k views

Get page URL from current page, different store-view

I'm using different store-views to create different language versions of a shop. Now I'm trying to add links to the other pages. However, I can not find a way to get the actual URL from the other ...
6
votes
1answer
520 views

How can I get only the Store View attributes, without the inherited Global data? I only need the diffs

I'm using the internal Magento APIs to get the product data on a store view level. I only want to get the values that are on that store view level, not the global values that in inherits. But it ...
6
votes
1answer
1k views

How to get the product id and SKU code of the product selected

I am using a plugin to enable notify me (Out of stock) feature, the plugin is working properly but the problem is it is taking the core product id and storing it in the backend, even after I select a ...
6
votes
1answer
1k views

“Interface Locale” admin language problem

In my admin page, the "Interface Locale" dropdown is not working. I already switched the default language to German, but is still shows English. The same with Chinese. How can I solve this problem?
5
votes
5answers
7k views

Is there any way to get back the cancelled order?

I have cancelled an order in magento, I need to get back the order with status pending and wanted to process the same order again. Is there any possibility of doing it.
5
votes
5answers
2k views

Magento Hacked: displays list of user emails and error message

-My client suspects his site was hacked,I'm not sure, but when I open index.php I get a list of emails and usernames, and what appears to be encrypted passwords (please correct me if I'm wrong). I ...
5
votes
3answers
3k views

How to disable report viewed products in magento

Our magento store is writing about 50 rows per second to the report_viewed_product_index table. How can I disable this event? I have log cleaning cron enabled but that doesn't prevent the ...
5
votes
3answers
4k views

What is the file path to edit the checkout page in root?

How to edit/add one new field in checkout page?
5
votes
4answers
5k views

How can I assign an order to a customer?

Let's say if a customer has an account, but for some reason can't log in, and creates an order by checking out as a guest. How can I assign this "guest order" to her customer account? This is so as ...
5
votes
3answers
10k views

How to redirect from an Observer and send a message to the customer

I am using an Observer to catch that event: controller_action_postdispatch_checkout_onepage_saveBilling I want that event in order to check the billing address of the customer. My question is: How ...
5
votes
1answer
927 views

Can I use a .sql file in my Magento module installer?

I have a large SQL file. Can I use this in my module installer?
5
votes
5answers
14k views

Magento 1.9 checkout and cart very slow

Today i implemented Lesti_Fpc which was a huge huge huge speed bump for the entire site. but i still struggle with the Cart and Checkout pages. load times of around 6 to 9 sec. for the cart page. ...
5
votes
1answer
23k views

Get category image to a page template

I have created a new page template here: /template/page/category.phtml and copied inside the content of 1column.phtml. What I want to accomplish is to get the category data variable in this new ...
5
votes
4answers
5k views

How to debug vsprintf() “Too few arguments” error in my log files?

I keep seeing the following report in my system.log file: 2015-10-20T12:34:07+00:00 DEBUG (7): Array ( [type] => 2 [message] => vsprintf(): Too few arguments [file] => app\code\...
5
votes
3answers
6k views

New module router index 404 error

I'm attempting to build a module but I can't even get the url routing to work as it keeps responding with a 404. I've follow this tutorial in an attempt to get it working but I still get a 404 page ...
5
votes
2answers
395 views

Set Magento Config Data For Script Duration Only

Is it possible to set a Magento configuration option for the duration of a single script only? I'm trying to programatically and recursively create orders in Magento. I want to enable the Flat Rate ...
5
votes
2answers
451 views

How to get list of overridden controllers?

Is it possible to get list of all overridden controllers ? How do I get a list of all class rewrites? mainly applies for blocks, helpers and models.
5
votes
2answers
1k views

Magento Certification - multi-answer multiple choice questions [closed]

For those of you that have taken the test or know about it - I notice there are questions that require you to choose 4 correct answers out of 6. If I get 3 right and 1 wrong, am I given any marks at ...
5
votes
3answers
3k views

What is the best database backend?

Magento offers support for different database back-end. I wonder which one of the OpenSource DB Backend (like MySQL or MariaDB ...) has better performance with Magento architecture. I know that ...
5
votes
2answers
459 views

Custom Tab on Adminhtml Catalog Product New Page Appearing In Two Places Instead of One

I'm trying to add a custom tab to the new product page in the admin panel. The first block added my tab successfully to the product edit page. The second block definitely does add the tab to the new ...
5
votes
2answers
5k views

Layout Update XML - Update Handle

I'm trying to change the layout handle for specific CMS pages in the back end. To do this I'm trying to use the following in Design->Page Layout->Layout Update XML <update handle="store_page" /&...
5
votes
2answers
364 views

how to get store configurations from cache in magento 1?

I'm trying to find out the way to get store configuration values (Mage::getStoreConfig($path, $store)) from cache. The reason for this is that I don't want to make db connections every time I'm ...
5
votes
2answers
5k views

Change page title via local.xml

I have managed to change the title of the Register page with the following code in local.xml <customer_account_create> <reference name="head"> <action method="setTitle"><...
5
votes
2answers
4k views

Remove Subtotal, Shipping & Handling and Grand Total on order email?

I don't want to display Subtotal, Shipping & Handling and Grand Total on order email. How can I remove it? Thank you!
5
votes
2answers
5k views

Admin roles role_type table column

In the admin_role table there is a column role_type that can have 2 values: 'G' - Mage_Admin_Model_Acl::ROLE_TYPE_GROUP 'U' - Mage_Admin_Model_Acl::ROLE_TYPE_USER By their names I jump do the ...
5
votes
1answer
541 views

How to add a multiselect field to system config field table?

I want to add a table to a config section, where one column is a multiselect field. Code is simliar to https://www.integer-net.com/how-to-create-tables-in-magento-system-configuration/, but Magento ...
5
votes
1answer
587 views

What to do if my Magento website is affected by Cloudflare's #Cloudbleed traffic leak

As some of you may know, a Cloudflare vulnerability has been released yesterday. From what I understood, a lot of websites have been affected because they hosted JS libraries on their CDNs. Some ...
5
votes
1answer
11k views

How to add custom block at the /checkout/cart/ page?

I am working on a custom extension and i want to add additional block to the /checkout/cart/ page. Take a look: Here is my config: <?xml version="1.0"?> <config> <modules> &...
5
votes
1answer
2k views

How should I define and use a custom module Exception?

I want to create a custom Magento exception class for my module. Are there any rules for how I should do it? Where should I put the new class? How should it be thrown? I'm familiar with Mage::...
5
votes
4answers
1k views

Alternative to file_exists() function [duplicate]

When trying to boost code quality, I frequently encounter errors like "The use of function file_exists() is forbidden" when trying to use PHP file functions. This for instance happens with the Magento ...
5
votes
3answers
1k views

Batching database schema changes during upgrades

Some background When rehearsing a production deployment to EE 1.11 from 1.10, we encountered an issue where the SQL upgrade routines were adding columns to report, log, sales, customer tables for the ...
5
votes
3answers
465 views

Confessions of a Core Modifier

A few pertinent questions here: What's the best way to identify core changes and work them into modules? Is there a free alternative to http://www.fontis.com.au/mageaudit/ ? How about subversion/...