magento

Changing the root_dir on a magento system

Hi I want to create another instance of magento for development purposes. I've copied the site and the database and changed the connction string for the database. However, when I go to log in to magento it re-directs to the live site www.example.com rather than going to the test url test.example.com. Both instances exist on the same ...

Show custom options in Magento products list

Hi, I have a bunch of simple products listed on the homepage and I want to display the custom options for each one of them. The custom options are added by me from the admin and they show on the individual product page but I just can't display them on the listing page. I tried this but it didn't work for me. I'm using Magento 1.4.1.1. ...

How do I have to add a Manufacturers in Magento

Hi guys, How do I have to add the Manufacturers Attribute in Magento using php? Thanks ...

Magento extension not registering in core resources table

I am writing a Magento extension and I just cannot get it to show up in the core resources table. I believe I am declaring the resources part of my config correctly. Can someone help me wrap my head around this? Thanks in advance! <?xml version="1.0"?> <config> <modules> <CTRL_Analytics> <version>0.2.0</version> ...

Magento - how to include javascript file on a page by page basis

In magento I know how to include js files in the page layout file. How though, do i include specific javascript files only on certain pages with my custom module. For example i am writing a custom module that will work with the product view and list pages. I therfore want to have some sort of layout update that i can use with my module...

Which Magento Product Type for grouping products then displaying them in a list each with "add to cart"

I am implementing a magento shopping cart for the purpose of selling course material and online/offline tests. Their is a couple of different ways to purchase the course material. Book Only Online Test Only Book & Online Test Paper Test Only Book & Paper Test Each of the above are represented with their own sku's and prices and va...

Magento: which catalog_product_flat I need to select from? and what is catalog_product_entity_datetime table?

Hi everyone, To know who are the customers needed to be sent the notification mail and know which are the products remain 2 hours before the deal expired, I need to select from wishlist, wishlist_item, customer_entity and catalog_product_enity table which need to join with catelog_product_flat_X But there are many catelog_product_fla...

How do I have to add a collection of products in Magento?

Hi guys, I need to add about 100.000 records in my Magento Store. I have already the function that helps me to add a product but I need to improve it using the collections of products. This is my custom function: public function Products($data){ try{ foreach($data as $record){ $product = Mage::getSingleton('c...

Magento - Email Shipment = Default

When creating a shipment in Magento there is a checkbox which allows you to "email a copy of the shipment". By default this is unchecked. Does anyone know which file I need to edit to set this 'checked' by default? ...

Where is the filter for configurable products while caching layered navigation attributes?

I need to locate the code, where layered navigation filter (options) are build... It seems these options only come from config. products which are visible in catalog and search, but i need to change this behaviour to a new visibility state... ...

Magento > Backend > New Menu Item needs specific action -> How do I do it?

Hi guys! I have created a new menu in my backend, and added some children. One of these children named "Manage Pages" must retrieve all the products that correspond to the attribute sets that begin with "CMS_" and should not have a price column. I have done this so far: app/code/community/Mycompany/Content/etc/config.xml <?xml versi...

How can I remove index.php from the address while redirect requests to index.php via fastcgi?

I have a basic Magento (PHP app, using index.php as the controller) setup on an Ubuntu server. I configured NGINX to use PHP-CGI to serve all PHP pages. While the site is working as expected, all the URLs are of the form: http://domain.com/index.php/apparel/shoes.html Is there a way to use the nginx rewrite setting so that I can have the...

Why do local variables in Magento have an underscore prefix?

As a follow up to an earlier question I wonder if anyone knows why Magento templates all declare their variables with an underscore. Templates are .phtml files include-ed from Mage_Core_Block_Template::fetchView(), their local variables are disposed of by the end of the function and never become global. So what's the point of an unders...

How to select specific fields with aliases using joinTable or joinField in Magento

I want to pre-filter* data in the invoice grid visible in Magento's admin panel. Here is a question that I asked earlier, and this one is related to the solution presented for that, hence it might act as a good explanation. So, I am modifying the Mage_Adminhtml_Block_Sales_Invoice_Grid::_prepareCollection method so that it first fetch...

jquery,prototype,mootools altogether in magento

Hi, I have got a template which is really nice with great Ui. But they used jquery and mootools without any prob. And now i incorporate that one with magento but i have the prob with prototype. Is it possible to use all these libraries together. Please help me. And one query with stackoverflow : here i had more than 110 reputation but ...

Adding new column in Sales Order View Items in Magento Admin

In the admin interface of Magento I need to modify the tables in the Sales / Order / View order so that it shows, besides the products name, their manufacturer as well. I'm trying to look for the file to modify to make that happen. I thought I would find a section with all the columns that are displayed in app/code/core/Mage/Sales/Block...

displaying category on a cms page in magento

Hi All, I am using a CMS page and i want to show some particular Categories on that page.Can anyone plz guide me how can i do it with the category image as well thanks a lot.. ...

Magento generate order number before save

the default format of the order number in magento is "100000001", but i need to generate my self the number of the order, to a get diferent format and can use it before save the order in some validations of the payment method, so, how can i generate the order number and then save it with the orther in the DB?? thanks ...

Magento : Moving "Recently Viewed" to product page creates weird caching error

So we have put the "recently viewed" block into our product view. Everything seems to look fine at first but I'm now seeing weird errors that have to do with null layouts. If i turn caching off it works fine, but with full page caching enabled it fails when calling $this->getColumnCount(); in the template. What I have done to enable r...

How to remove all cross-sell product links from Magento?

I want to remove all of the cross-sell product links from the store - we have around 22,000 links that was the result of an auto cross sell extension that I have since removed. I imagine it has something to do with removing records from the table catalog_product_link? Or is there a way to do this programmatically? ...