Questions tagged [module]

Questions about developing custom modules

Filter by
Sorted by
Tagged with
6
votes
2answers
34k views

How can I get magento product image url for a thumbnail in an array?

I have a data module that gets information for a product and its attributes associated with it like color, sizes etc. In here there is an image that needs to be taken and put into an array in ...
2
votes
2answers
899 views

Extend a community module - Inchoo Facebook Login

I would like to extend a community module. The one I am refering to is the Inchoo Facebook Login. This module has a class called Inchoo_Facebook_Block_Template and one of the classes methods is: ...
1
vote
1answer
378 views

Magento setOrder and sort ignores year

A while ago I created a simple blog addon for Magento. Due to neeidng isotope it was kept simplistic. However a while later it appears that the sort order isn't quite working. In both the backed and ...
3
votes
2answers
10k views

Magento generate coupon codes programmatically

I would like to create unique coupon codes automatically. I have tried the following - when using setCouponCode() to generate coupon code, i must set static code. Example: $code = "abc"; ...
2
votes
3answers
2k views

Programmatically installing a module

I need to install modules so that the database changes happen. I can't just let it be an install on logging to admin type of approach as I have a bash script that I am using to provision my test ...
0
votes
1answer
931 views

Magento module's block code is working in product details page but not working in category and list page?

In magento I am writing one module. In my module lets say I have mymodule.xml where I want to insert my own block after this block <catalog_product_view> <reference name="product.info"&...
3
votes
2answers
470 views

When did data install/upgrade scripts get introduced

What version of Magento first allowed data install/setup scripts i.e. mymodule/data/mymodule_setup... It looks like in 1.5 CE data scripts do not work - but a cursory look at the core resource setup ...
2
votes
1answer
2k views

custom config for module - not store config

If I want to add a custom configuration node in my modules config.xml, how would I go about this and how to retrieve the values? I do not want store configuration, just a node in my modules ...
1
vote
1answer
383 views

Modman - dealing with template files spread across multiple modules

I use modman for development and will typically have a core module in the client namespace for the heavy lifting of the customisations such as the theme, locale base install/upgrade scripts etc. ...
2
votes
0answers
89 views

Config default image not saved (On first save, when no new image uploaded) [closed]

I have a module with some config options that are used in the admin configuration section, and these have defaults applied. When the user has never pressed save in that section, all the defaults are ...
6
votes
3answers
2k views

Extensions charging more for enterprise?

Why are Magento extension providers charging extra for enterprise versions of their modules? I have a pretty good idea that the codebase for both of the module versions will be identical so where ...
2
votes
2answers
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: =================...
1
vote
1answer
1k views

totals sort of custom added row in my account order view

I have problem with sort custom added row in totals. I successfully sort new row in cart and checkout page with this in my moduele config.xml <default> <sales> &...
0
votes
1answer
142 views

layout handle for add button to newsletter edit template in adminhtml

I develop module for add new button in newsletter edit template in adminhtml. And don't know which layout handle must use in my layout xml. I try something like this but did not work: <layout ...
2
votes
1answer
37 views

only absolute definition (instead of relative) of path to Models in custom module is working for me. Why?

I know that definition of path to Models and other stuff in Magento config.xml must be in absolute way. But in my case that didn't worked. Magento did not found my models. When I change definition in ...
2
votes
1answer
348 views

Ordering Modules that both use sales_order_place_after observer

I'm writing two custom modules that act independently on the sales_order_place_after event observer and modify order state and status. One module (Module A) will act on every order and update the ...
1
vote
2answers
5k views

Error:The address total model should be extended from Mage_Sales_Model_Quote_Address_Total_Abstract

Have problem with my custom module to show custom items to totals. When place order the error show up: The address total model should be extended from Mage_Sales_Model_Quote_Address_Total_Abstract....
7
votes
4answers
35k 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 ...
0
votes
1answer
608 views

My block doesn't show for admin module

Another issue with building my admin module!! I can't get the page to show! Already have the page and drop down links showing without errors like I had last week. Now I can't get my template page to ...
0
votes
3answers
201 views

Trying to rewrite getMediaDir in Mage_Core_Model_Config_Options

I have successfully managed to change the destination of CMS wysiwyg folder thanks to Marius, here but that is relative to media dir that is defauled to ./media. Now I have made module to change the ...
4
votes
2answers
2k views

My admin module yields helper not found error on dashboard page

I've stripped my module down to try and identify this error. The following are my files. Can you see why I get the error "Fatal error: Class 'Mage_Caitlinhavener_Addschool_Helper_Data' not found in /...
1
vote
1answer
562 views

Move Languages Module from Footer to Header

I want to move the Language Change options from the footer to header. To do this I simply moved this code in the page.xml file of my current template: <block type="page/switch" name="...
1
vote
1answer
588 views

Set a module to try to serve content over https instead of http

This part of the ogone plugin gives a person insight into his/her order history. Problem is, this thingymijig redirects to http protocol instead of https. Other nasty sideeffect is that it redirects ...
2
votes
4answers
296 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 ...
1
vote
1answer
124 views

Where in a custom module can you declare / consolidate all of your custom functions

I am building an admin module which extends the sales order mass actions. I am at the point where I have added my module to the mass action dropdown, and am receiving the post data in my controller. ...
0
votes
2answers
3k views

Module causes 404 errors on index and magento connect pages

I am getting a 404 message within the body of the index and magento connect admin pages. When I remove the module that I recently added, they come back. Can you see what is wrong with my module that ...
0
votes
1answer
226 views

My new module does not fire or I'm missing something obvious.. please help

I'm trying to rewrite Magento wysiwyg config class, specifically one constant,, all in the need to change the default upload location of images in admin (for products, cms pages etc..) and this is my ...
1
vote
1answer
13k views

How to filter product collection by attribute's admin option values?

I am currently developing a product configurator. I am submitting a form which sends the admin option values of my custom attributes via POST to a controller action. If I use the current store's ...
4
votes
2answers
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.
0
votes
1answer
2k views

Problem with custom module : url redirects http to https

I have facing problem that module which I created working fine. But when I started using SSL i.e. http to https for checkout process. Front end modules which I created started to force use https.
0
votes
1answer
611 views

addFieldToFilter doesn't return the right product for selected attribute values

I am currently programming a product configurator module for Magento. Everything is working fine so far besides the core functionality: choosing the right product from the database for the selected ...
2
votes
1answer
1k views

Get Real Shipment ID

I am able to retrieve the real order id by $order->getReadlOrderId(); I am unable to find any documentation or posts that show how to get the real shipment id, so far I am only able to get the Id ...
1
vote
1answer
1k views

How to add custom text to price or How to display EMI prices in order review?

As my site uses EMI options for payment the prices in Order review section should be shown in Rs.xxx per month format. I've made changes to phtml files only [to do this], because it should only ...
3
votes
3answers
7k views

Add Custom Total to Cart's GrandTotal in Magento

I'm trying to add an oversized fee for large products. Most of what that entails is a little more complicated than I want to explain here. Basically, I've built a custom function to check if the ...
0
votes
2answers
123 views

General question regarding modules / extensions

I'm working for a computer components store. My end goal is to make a 'Build your own computer' page where customers can pick components from each category (CPU, Memory, etc) and add them all to the ...
0
votes
1answer
2k views

model class for add custom totals

This is my class for add some custom totals to invoice: class Devpassion_Rowtotal_Model_Order_Invoice_Total_Totalpopust extends Mage_Sales_Model_Order_Invoice_Total_Abstract{ public function collect(...
0
votes
3answers
690 views

Extending A Single Method Using Depends

I am trying to extend the admin order grid by adding a single column. I don't want to add all the logic again in my code, so the only method I'm calling is _prepareColumns(): protected function ...
1
vote
1answer
559 views

Jquery Plugin Undefined In Module

I'm trying to load a jQuery plugin, tinyCarousel, for use on the page. The jQuery library is included as follows in the layout.xml file: <layout> ... <default> <...
15
votes
2answers
7k views

How should I licence my module?

I have a module which I have written for my company. It takes data from our back office solution and imports it into Magento. It also takes orders from Magento and imports them into the back office ...
2
votes
1answer
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....
5
votes
4answers
337 views

What is the proper way to add theme-specific translations of new strings?

We are creating a new template and have some new text which are not yet defined anywhere. If they would be defined before we would add some "Mage_TheModule::Foo";"Fuh" to the translate.csv in the ...
4
votes
3answers
12k views

Disable modules via database

I don't have access to the backend and need to disable all the modules. How can I disable them via database?
3
votes
2answers
4k views

How to add files for custom module under system configuration? [duplicate]

I have my own module in System->Configuration and want to add js and css files for it. Now it is so: <layout version="0.1.0"> <default> <reference name="head"> ...
3
votes
1answer
8k views

Add Javascript File To Head For Create Block

I need to create a block programatically (for various reasons): $myblock = Mage::app()->getLayout()->createBlock('namespace_module/path', 'my_block', $params); This works fine, but the ...
5
votes
2answers
4k views

Is It Possible To Create My Own Shortcode

I'm building a module. I want to be able to use a shortcode (template directive) in my CMS static blocks, such as the following: {{store url=""}} I want to call my own module's frontpage blocks ...
0
votes
2answers
2k views

Is there a way to check whether a GUEST customer has subscribed to newsletter, in that particular session?

I have to hide the newsletter subscription form from customers who already subscribed. For registered and loggedin customer i'm able to check the subscription status using the following method: $...
1
vote
3answers
331 views

Why Mage_Catalog_Block_Layer_Filter_Price is not getting overridden in live site?

I'm working with Magento EE 1.12.0.0 In one of my modules I have overridden Mage_Catalog_Block_Layer_Filter_Price and it works perfectly fine in my localhost, but when I install the same module in my ...
0
votes
1answer
837 views

Internal messaging system for logged in Admin users?

I have been searching for a solution for extending default Magento email functionality in order to send internal messages from Admin user to Admin user. I haven't found any good resources on how to ...
1
vote
2answers
6k views

Select Product Where Price Is Greater Than Zero

Given the following code: $mageProductCollection = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('*') ...
0
votes
1answer
474 views

Add Product Id Array To Custom Table From Admin

I think I've kicked the hornets nest. I have a custom db table. I am displaying a list of products in admin similar to the related products tab or the upsell tab. I want the id's of selected products ...