Bundled Products, Magento will not recalculate the Price – Bundle.reloadPrice()

Hello, I’m Tofu, nice to see you again.

My client gave me a purchased Magento template and asked me to install and configure a new Magento store for him. The template was very clean and professional. However, there was an weird issue since it did not support the latest Magento version 1.9.

I created serveral bundle products just for testing purpose then I added or subjected items to the cart, the price did not change. I got js errors:

Uncaught ReferenceError: taxCalcMethod is not defined 
Uncaught TypeError: Cannot call method ‘reloadPrice’ of undefined

Finally, I figured out the problem. We will need to copy the following javascript snippets from BASE theme to our activated theme in
/app/design/frontend/default/YOUR_TEMPLATE/template/
/bundle/catalog
/product/view/type/bundle.phtml

bundle-magento-products

Enjoy!

[Magento] 503 error after installing extensions

Hello, I just installed Magento shopping cart, via host monster. Earlier in the day, I installed a bunch of extensions through Magento Connect Manager. When I went to go back to my Admin section, I got the 503 Error.

“Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”

maintenance-flag

I’ve seen this happen before after upgrading or installing extensions and in many of the cases it appeared to be that the maintenance.flag stuck. Check your Magento installation root folder, look for that file and then delete it.

maintenance.flag.solution

[Tofu And Tomato] [Magento Solutions] Fix email not sent

Today, my client at http://www.dubuy.it/ told me that, he had an weird problem with email settings in Magento, he had never receive any sale / order emails after submitting one-page-checkout form.

If the order displays the email as sent and you or your clients are not receiving the email, then the problem is most likely the email settings you have for Magento or the local email server that Magento is using.

I also checked the settings:

  • Admin -> Configuration > Advanced -> System > SMTP Settings and see that you do not have emails disabled.
  • Admin -> Configuration > General > Store Email Addresses and check if you have the email addresses in there correctly. Sometimes email servers would refuse to send email if the senders email is not a proper email address.

However, the settings are correct but emails still were not sent. After digging into the code, I found the issue:

Just been looking into this myself. I’ve followed the code and functions back to this function “public function sendNewOrderEmail()” in:

app/code/core/Mage/Sales/Model/Order.php

starting at line 1270 is the following code:

$emailSentAttributeValue = $this->load($this->getId())->getData('email_sent');
    $this->setEmailSent((bool)$emailSentAttributeValue);
    if ($this->getEmailSent()) {
        return $this;
    }

This is checking the sales_flat_order db table to see if the email has already been sent to the customer and if so just to return, but this does not send the email and should throw an error. So I would say it is a bug somewhere. To fix it so you can resend order/invoice emails etc..

Copy

app/code/core/Mage/Sales/Model/Order.php

to

app/code/local/Mage/Sales/Model/Order.php

and comment out line 1273

if ($this->getEmailSent()) {
            //return $this;
        }

Works like a charm for me. But literally only this second tested it.

magento-fix-email-not-send