Magento: add to cart button is not working

In my custom theme there was this code for Add to cart button:

<button type=”button” class=”button-form” onclick=”productAddToCartForm.submit()”><span><?php echo $this->__(’Add to Cart’) ?></span></button>

The problem was that nothing happened when you clicked it. Just remove type="button" so it looks like this:

<button class=”button-form” onclick=”productAddToCartForm.submit()”><span><?php echo $this->__(’Add to Cart’) ?></span></button>

It worked for me…

How to fix Magento on PHP 5.3

We got this project when our server is newly loaded with PHP 5.3.

Here is the Fix:

To get it working in php5.3 seems to be quite simple as the offending part of the __toString function seems to be only used by one object:
app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php which calls the function with the defaults anyway.
in /lib/Varien/Object.php line 484 replace:

public function __toString(array $arrAttributes = array(), $valueSeparator=',')
$arrData = $this->toArray($arrAttributes);
return implode($valueSeparator, $arrData);


public function __toString()
        $arrData = $this->toArray();
        return implode(',', $arrData);

You also need to change app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php line 139 (untested) to:

$key.= implode('_', $taxReq->_data); 

The next thing to contend with is that split() is now depricated and there is a new error constant which Magento does not (yet) recognise. To ignore the error edit the file app/code/core/Mage/Core/functions.php after line 170 add :

if ($errno == 8192) {
        return false;

You’ll also need to ensure that index.php has the line:
ini_set(’display_errors’, 0);

Don’t know if any other issues arise but this has got it setup for me and so I can carry on evaluating whether we use this or not.

You can find a clear details in the following posts. (Solution is taken from this).

Magento site redirecting to /report page blank

Often when we upgrade the Magento site to new location or making another copy of the site in a different we usually get a Blank page on the Linux/windows box , the site will redirecting to a blank report page like this:;=default

Even the cache dir was empty.
And even the urls are changed in the core_config_data table to

This is the Fix!

The below folders show have writable permissions:


How to Use Magento Shopping Cart Price Rules

Shopping Cart Price Rules, as the name implies, are applied when the customer reaches the shopping cart. They can be enacted either with or without a coupon code, and include features not found in traditional coupon tools. To create first login to admin panel and goto Shopping Cart Price Rules go to Promotions -> Shopping Cart Price Rules and select Add New Rule.

Let’s start with creating a simple 10% coupon.


We first enter a rule name and description. Once those are in we select Active for Status.

You then need to select which Website the coupon will be good for. In this case we want to give customers in all stores the benefit of the 10 percent off discount, so we select all options for the Websites and the customer groups. You select multiple items by holding Ctrl while selecting.

We are then going to make the Rule applied only with a coupon code, so we enter our code. If a code is not entered the rule will take effect once the customer reaches the cart without any action taken.

Now we have Uses Per Coupon and Uses Per Customer. In this case we want to create a sense of urgency, so the coupon can only be used 100 times. We then set the Users Per Customer to 1, so each customer will only be able to use the coupon once. As the name implies “Uses Per Coupon” we can give here how many coupans can be used globally.

We then enter the dates the coupon is valid for and select the priority of the coupon. In this case we keep the priority as 0, the highest priority. If you remember from the Catalog Price Rules, the priority is used when you have 2 Rules applying to the same products. The rule with the highest priority (lowest number) will take effect first.

You can also decide whether or not each individual price rule will be made public in the price rules RSS feed that your customers can sign up for.

We are going to skip Conditions and come back to it since we are creating a simple coupon here. If this is skipped, the coupon will apply to all carts where the coupon code is entered. The products in the cart will not need to meet any conditions. To complete this coupon we select Actions from the left navigation.


Select Percent of Product Price discount (the other options being Fixed amount discount, Fixed amount discount for whole cart, and Buy X get Y free) and enter the value you want to discount. In this case it is 10.

We then want to enter a value for the maximum qty the discount will be applied to. Since we enter 5 here, the 6th product (must be the same item) will not have the discount applied, only the first 5 will receive the 10 percent discount.

The Discount Qty Step controls how often the discount is applied. If we were to enter 8 here, the 10 percent discount would only apply after 8 items are added to the cart. If more than 8 items were added to the cart, the discount would remain as 10% or 8 items, until 16 items were added to the cart, at which point the discount would become 10% of 16 items. This would continue for every factor of 8. This would be useful for sellers who sell items in packages of 8 and only want to give discounts to each group of 8 items. In this case, we do not sell our items this way, so we will leave is field blank.

You can also elect to combine the coupon amount with a free shipping offer, either just for the products the coupon is valid for, or for the whole order if one of those products is present in the cart. We aren’t feeling that generous in this case though, so we keep this dropdown at No.

Finally we stop further rules from taking effect on the products in this Rule. This means that if one of the products also had another Shopping Cart Discount Rule set up it would not take effect because this rule has the higher priority.

If we were to set this value to No other rules could take effect. For example, if we had a buy 2 get 1 free coupon for one of the items set up to take effect without a coupon it could then take effect after we discounted the first 2 by 10%.

Now that we have the coupon information entered we can move and select which products the coupon is valid for.


In this case we are going to have the coupon valid on all products, so we will leave this section blank. If we wanted to specify this coupon to apply only to certain products, however, we could generate a set of conditions which the products must match in order to have the discount applied to them.

Now we select Save Rule and our 10% coupon is set to go, ready to be mailed in your newsletter and begin generating sales.

Now that we set up a simple rule based coupon, let’s look at how to create more complicated Rules using the Conditions. This works similarly to the conditions we can can create to specify to which products the coupon will apply.

The advanced Conditions provide a lot of flexibility, letting you look at values besides just selecting products. Let’s use the Advanced Conditions to set up a Buy 2 get 1 Free promotion.

In this case we are trying to push a digital camera, a family deal if you will. So we set up the Coupon Information as we did last time. In this case we will leave the coupon code field blank, meaning the discount will take effect once the customer adds the products to their cart.

We want to create the deal for the Argus QC-2185 Quick Click 5MP Digital Camera. We go to the Conditions, where we will set up the rules for the product to take effect.


We want 2 conditions to be true, the product must be the Argus QC-2185 Quick Click 5MP Digital Camera and the quantity in the cart must be 3, so we set the conditions to take effect as shown above. We then move to create our first condition, that the product will be this camera. In this case we will use the SKU of the camera.


We then want to set up our quantity rule. We are going to set the rule up so that people buying 3 or more will get one free, so we select equals or greater than.


We now move to the Actions to complete the Buy 2 Get 1 Free deal.


We set the discount at a Fixed Amount and enter the discount amount, $34.90. We then set the maximum quantity discount is applied to to 3, leave free shipping and the further rules processing as they are. Because this is a one time fixed amount discount, it does not need to be restricted so that it applies only to certain products, so we will leave the bottom section blank. If we did need to restrict this rule, however, we would establish the conditions here much like those established in the Conditions tab. When we are finished, we will select Save Rule. Now just send out your marketing message telling customers that if they Buy Argus QC-2185 Quick Click 5MP Digital Cameras one of them will be free.

Finally If we want to delete that rule simply click on top right delete rule button.

Opencart vs Prestashop vs Magento

The new open-source free shopping cart software based on PHP/MySQL is as follows: Opencart, Prestashop, Magento。They have already exceeded osCommerce, Zencart, CRE Loaded.If you just want to build a media-sized shopping cart, choosing them is a very good choice. However, these three kinds of shopping cart software have their own advantage and disadvantage. Which to choose? Let’s make a contrast. You can choose according to your requirement. Of course, you can also tell IECSP the detailed requirement, we assist you to determine which shopping cart software to choose.

Function contrast:

Features Prestashop Magento Opencart
Open Source 100% 100% 100%
Pricing Free Free Free
Templatable Smarty Smarty PHP
Product Reviews
Product Ratings
Related Products
Product Features
Discount Coupon
Backup & Restore
Printable Invoices
Sales Reports
Free Shipping
News & Events
Wish List
Track order
Gift Certificate
Recently Viewed
Bulk Category Add
Bulk Product Add
Product Comparison
One-page Checkout
Order Barcode
Merchandise return (RMAs)
RSS Feed
Send to friend
Access Restrictions
Live Chat Software

Conclusion: Magento win, Prestashop and Opencart lose.

Code contrast:

Opencart’ code is not only a very excellent but also a high efficient framework, which adopt MVC schema development, and have a clear logic structure, easy to study and modify. Of course, the precondition is that you have to possess a powerful PHP developing ability. Opencart don’t use the Smarty template engine, which is a reason IECSP admire it. This project can not only increase the efficiency, but also decrease the code workload of the programmer.

Based on PHP5, Prestashop adopt smarty template engine. The first MVC schema is not excellent. It will be tough, if you touch the code of prestashop first. The linage of code is much more, for it adopt smarty, increase the workload of extending development.

Magento adopt Zend framework, not smarty template engine. For the programmer who are making extending development, they not only need to master PHP, but also need to handle Zend framework. The efficiency of development will be increased, if you can handle Zend framework. However, adopting Zend framework will definitely decrease the disposal performance of Magento, which is congenital deficiency, but Magento add the Compiler module in order to increase performance, at least 30%.

Conclusion: Opencart win, Prestashop and Magento lose.

Speed contrast:

We deploy the three shopping cart softwares on the same host, and turn on the cache function, Magento turn on Compiler module, the homepage display 20 products. We make the first and second visit to every shopping cart software, then record the visit speed. Through many time testing and average value contrast, we find that the speed of Opencart is the best. The speed of Prestashop and Magento is a little worse. What IECSP need to show is that our test is based on our own host environment, our own simple method, not the general objective evaluation. The possibility of error exist. If you test, the result maybe different from ours.

Conclusion: Opencart win, Prestashop and Magento lose.

Community and support contrast:

Magento developed by a company from US, Prestashop by a group of students from French, Opencart by a programmer from British.
Now, magento Community have 130,000 members, Prestashop have 30000 members, Opencart have only 4000 members.

Conclusion: Matento win, Prestashop follow, Opencart last.

IECSP.COM original article

shopping list » Opencart vs Prestashop vs Magento

Opencart’ note is not not a quite first-class but also a acme enriching framework, which persuade someone to go MVC schema in any case, and force a persuade someone to go a run-out sprinkle a give exposed orderly logic arrange, assent to to deliberate over and rewrite. Of answer, the heady is that you force to cast a magic over a unfeeling PHP developing gifts. Opencart don’t speak the Smarty die locomotive, which is a objective IECSP honour it.
Based on PHP5, Prestashop persuade someone to go smarty die locomotive. This conjure up can not not dilate the adroitness, but also subsidence the note workload of the programmer.

The bring round initially MVC schema is not first-class. The linage of note is much more, seeking it persuade someone to go smarty, dilate the workload of extending in any case. It on be unfeeling, if you strike the note of prestashop bring round initially.
Magento persuade someone to go Zend framework, not smarty die locomotive. The adroitness of in any case on be increased, if you can control Zend framework.

For the programmer who are making extending in any case, they not not beggary to biggest PHP, but also beggary to control Zend framework. However, adopting Zend framework on certainly subsidence the disposal fulfilment of Magento, which is congenital deficiency, but Magento alpha the Compiler module in non-sequential to dilate fulfilment, at least 30%.
Speed brave:
We deploy the three shopping barrow softwares on the unchanging hostess, and roll on the vault conclave, Magento roll on Compiler module, the homepage disclose 20 products.

Conclusion: Opencart bring round, Prestashop and Magento bow to. We affect the bring round initially and next call in to every shopping barrow software, then recording the call in rapidity. The rapidity of Prestashop and Magento is a pygmy worse. Through numerous one day testing and middling value brave, we assign that the rapidity of Opencart is the pre-eminent. What IECSP beggary to inform is that our check up on is based on our own hostess precincts, our own forthright method, not the comprehensive equitable approximation. If you check up on, the come to pass conceivably rare from ours.

The admissibility opportunity of slip-up be base.
Conclusion: Opencart bring round, Prestashop and Magento bow to.
Now, magento Community force 130,000 members, Prestashop force 30000 members, Opencart force not 4000 members.
Community and succour brave:
Magento developed away a plc from US, Prestashop away a troop of students from French, Opencart away a programmer from British.
Conclusion: Matento bring round, Prestashop adhere to, Opencart after.
IECSP.COM first article, abandon a persuade someone to go a run-out sprinkle a give exposed implication of the artical coming from desire, if you longing to replication.

E-Commerce mit Magento: Firmen haben bereits so große Umsätze

Firmen haben bereits so große Umsätze durch Web-Shops erzielt, dass diese kaum noch wegdenkbar sind. Aber um diese Größenordnungen zu erreichen, muss der Web-Shop im Stande sein, Kunden und Verbraucher mit Angeboten, aber auch mit der visuellen Erscheinung des Shops zu locken. Abhilfe schafft hier Magento, ein erstklassiges Open Source Shop System für Linux.

Die Version 1.0 von Magento wurde erstmals im Jahre 2008 veröffentlicht. Gründer dieses CMS ist Varien Inc. in Los Angeles, genutzt unter 3.0 der Open Software License. Die Programmierung begann bereits 2007, veröffentlicht mit einer Beta-Version von Magento. Mittlerweile ist bereits die Version 1.3 erhältlich.
Magento nutzt standardmäßig PHP und MySQL. Die Konfiguration erfolgt per XML-Dateien; diese nutzt Magento zum konfigurieren des Interfaces und und der technischen Basis. Somit kann die Darstellung im Backend, sowie im Frontend flexibel angepasst werden.
Die Besucher kürten Magento bei einer Konferenz namens “Under the Radar: The Business of Web Apps conference” zum Favoriten.

Für wen und was wird Magento genutzt?
Im Mittelpunkt stehen Unternehmen, die ihre Ware via Web-Shops unter die Leute bringen möchten. Um den Shop erfolgreich zu betreiben, bietet sich die kostenfreie Software Magento sehr an. Da Magento kaum Wünsche offen lässt und wirklich alle notwendigen Funktionen beinhaltet, ist es für jeden Shop-Betreiber bestens geeignet. Die viele Benutzer noch Anfänger in Sachen Content-Management-System sind, kann das Programm selbst einem Laien dabei helfen, einen anständigen Shop auf die Beine zu stellen.

Systemvorraussetzungen des Webhosters
Neben dem Betriebssystem Linus hat Magento einige andere, wichtige Vorraussetzungen, die der Webhoster erfüllen muss. Er benötigt vor allem Apache 1-x oder 2.x, sowie standardmäßig PHP und MySQL. Außerdem wird noch MySQLi, mcrypt, mhash und simplexml gebraucht. Auch ein Mailserver wäre sehr von Vorteil.

Was unterscheidet das CMS von anderen?
Magento lässt sich individuell an die Bedürfnisse seines Benutzers anpassen. Laien werden nicht im Stich gelassen: Das Programm zeigt dem Benutzer Schritt für Schritt, wie er zu seinen optimalen Web-Shop gestalten kann. Magento hat jetzt schon einen riesigen Funktionsumfang – dennoch wird dieser ständig von Entwicklern weitergebildet, sodass für den Benutzer kaum Wünsche offenbleiben. Außerdem liefert das CMS eine grundlegende Basis für die Eintragung in Suchmaschinen; so wird der Shop von jedem schnell gefunden.

Casual Commerce » Magento Notes — Add Address Field to Customer Export

Recently came across something weird when a client asked how come when they are in the admin interface: Customers -> Manage Customers, and then they click on “Export to CSV” the Address field isn’t export.  I don’t understand the logic of why the address is omitted.

Funny thing is that the fix to include the Address field isn’t straightforward and NOBODY ran into this problem, as there were no postings on Magento forum nor google search…I was surprised.  Anyways, what happens when users click on “Export to CSV” is essentially what you see in the grid below it is what gets exported, so the fix is to include the Address field in grid.  The file to modify is a core file, so you would have to update this when you do a Magento upgrade. Here’s the path to the file:


Near line 45 you will find the below block of code, you will add the line that is in bold:

protected function _prepareCollection()
$collection = Mage::getResourceModel(’customer/customer_collection’)
->joinAttribute(’billing_street’, ‘customer_address/street’, ‘default_billing’, null, ‘left’)
->joinAttribute(’billing_postcode’, ‘customer_address/postcode’, ‘default_billing’, null, ‘left’)
->joinAttribute(’billing_city’, ‘customer_address/city’, ‘default_billing’, null, ‘left’)
->joinAttribute(’billing_telephone’, ‘customer_address/telephone’, ‘default_billing’, null, ‘left’)
->joinAttribute(’billing_region’, ‘customer_address/region’, ‘default_billing’, null, ‘left’)
->joinAttribute(’billing_country_id’, ‘customer_address/country_id’, ‘default_billing’, null, ‘left’);


return parent::_prepareCollection();

Then near line 103 add a the code below in bold:

$this->addColumn(’Telephone’, array(
‘header’    => Mage::helper(’customer’)->__(’Telephone’),
‘width’     => ‘100′,
‘index’     => ‘billing_telephone’
$this->addColumn(’billing_address’, array(
‘header’    => Mage::helper(’customer’)->__(’Address’),
‘width’     => ‘150′,
‘index’     => ‘billing_street’

Now you should see Address field displayed in the grid and when export is clicked it would export the field accordingly.

Magento Layered Navigation Problem – oDesk

The client uses dataflow to import products, does not refresh the layered navigation but does refresh the other caches, and the layered navigation disappears. I have been using :…

Freelancer jobs resources –

Magento vs. osCommerce – Online Stores Mean Business | Wakensys

The past months with recession effected has been a roller coaster ride for the economy all over the world. But tracking open source e-commerce systems over that same period of time has shown that online sales are still serious business.

Below is a comparision between osCommerce and Magneto open source e-commerce systems.

osCommerce has been there for quite some time and it has a very well established and responsive community to offer development and support. There are also countless numbers of ‘modules’ which could be found on the osCommerce web site, which allows developers to further customize osCommerce simplicity and flexibility resulting in ease of new add-ons.
But osCommerce is good when it comes to its ability to be translated and localized into any language. The development structure which is written in PHP using very clear definitions means that all the text seen on an osCommerce e-commerce store is handily stored in reference files which contains only plain text for translation which minimizes the risk of file corruption by web page translators.

It has been around for quite some time but those who are well versed in this area have seen a dramatic increase in demand for solutions in this platform over the last year.

Magneto is a new e-commerce store which scores highly for its look and overall features. The administrator back end is well organized and most of the items of concern are thoroughly covered, including rewritable URL’s (a must for well optimized online stores)

Magneto also has “Store View” which makes the online shop administrators to manage and set up multiple stores with the same products at different prices and even in different languages from the same administrator area.
This shows that Magneto is facilitated from within to translate many language packs which is already available, so all the hard coded static content and navigation are ready at a click of a button while having the admin area in your native language.

Magento is newer, so it isn’t surprising that this area started with fewer clients than osCommerce, but has maintained a more steady rate of increase over the past year. The number of clients each month that request Magento has skyrocketed during that time – there are 13 times more clients for Magento Solutions than there were last year.

Specific Features
For those curious about the specific features of each platform, the folks over at DCKAP have put together a handy chart. But either way you go, online commerce is a rising trend – and serious business!
Had experience with either Magento or osCommerce? Share your perspective in the comments!


Compare to both of the carts. Magento is the best ever I seen, I has so many features that i ever thought. And Customers are more satisfied with its features. But its a little slow compare to OScommerce.