Lightspeed Webstore

Sometimes you need to or you have to try out different solution then Magento. One of this is Lightspeed which is also a Mac program which has a web store called simply Lightspeed Web Store 3 written in php using the yii framework. Certainly it has less features then Magento and it seems rudimentary if you compare with it.

If you have to work with it bellow you have a resource.

Working with it I have even managed to find a funny reference to the movie No Country For Old Men based on the novel with same title by Cormac McCarthy.

In class Country from core/protected/models which extends BaseCountry

on line 92

protected function noCountryForOldMen() {
		$comment = "Wasn't that a disturbing movie?";
		return null;
Posted in Uncategorized | Leave a comment

Redmine error – hostname “localhost” does not match the server certificate

“An error occurred while sending mail (hostname “localhost” does not match the server certificate)” this was received while sending redmine test mail
The following setup in configuration.yml worked for me with the extra enable_starttls_auto: false

    delivery_method: :smtp
	address: localhost
	port: 25
	enable_starttls_auto: false

Also take the care to comment out in the bottom of configuration.yml the production section which overrides the default ones even if it’s just empty.

If even this does not help you try out the following in WHM if you have it. Go to Exim Configuration Editor and search for “Sender verification”. Switch it off. Save it.

Posted in Uncategorized | Tagged | 1 Comment

How to concatenate vertical column in Excel into one string?

Working with magento you often come across .csv or even excel files needed for import, export or reports. And sometimes you need excel to work or visualize data and even to to use excel functions. So how to concatenate vertical column in Excel into one string?
There is a yahoo answers which is not so good.
I have a straightforward solution using an excel formula for any number of rows. You have your column containing let’s say the country codes.
Fist step:
In B1 the second column first row you write the same value from A1 from the first column first row.
Second step:
Now for B2, the second row second column you write the formula =CONCATENATE(A2,”,”,B1)
Third step:
Now in your second column B, you simply drag the formula for all the cells in the column. In the last cell you’ll find your solution.
In the sample file I provide provide an excel find in which you can find my solution.

Posted in Uncategorized | Tagged , , , , | Leave a comment

Css merge does not work

If you enable css merge and you find that your site does not look the same or the styles are wrong then the reason behind it might be the css @import.
Remove the @import sections and add the imported css files in page.xml or in any other xml on under the default section the following way:

<reference name="head">
            <action method="addItem"><type>skin_css</type><name>my-css-folder/my-file1.css</name></action>
            <action method="addItem"><type>skin_css</type><name>my-css-folder/my-file2.css</name></action>

Also other simple causes can be that your css files are given in the wrong order in the xml head block or simply your css contains parser errors (curly brace { is not closed, contains invalid strings like html comments instead of the valid css comments and so on)
I advice you to check your css for errors with a validator like the one from W3
Removing css errors made merge to display the site correctly in many cases for me.

Posted in Errors | Tagged , , | Leave a comment

Google analytics not working?

Have you inseerted Google API in the admin? Yes? That might be a simple issue. Check googleanalytics.xml of your template. If you see something like

<block type="googleanalytics/ga" name="google_analytics" as="google_analytics" />

Bingo! The reference to the template file is missing!

Change it to

<block type="googleanalytics/ga" name="google_analytics" as="google_analytics" template="googleanalytics/ga.phtml" />

and ensure that you have the template file ga.phtml (you should have it in base). You are done!

Posted in Errors, Uncategorized | Tagged , | Leave a comment

Email a friend does not send mails with Amazon SMTP

If you have installed Aschroder SMTP module and happen to have an Amazon SMTP server and you’ve noticed that only email a friend does not send mail then the problem is with the SMTP server. If you check your error log you might notice an error like “Message rejected: Email address is not verified.” The solution is to localize in app/code/local/Mage/Sendfriend/Model/Sendfriend.php or overwrite in a custom module the model Mage_Sendfriend_Model_Sendfriend editing it in the following way: go to send() function and comment out

$sender  = array(
            'name'  => $this->_getHelper()->htmlEscape($this->getSender()->getName()),
            'email' => $this->_getHelper()->htmlEscape($this->getSender()->getEmail())

and add instead of it

 $sender  = array(
            'name'  => Mage::getStoreConfig('general/store_information/name'),
            'email' => Mage::getStoreConfig('trans_email/ident_general/email');
// in the message you can speicify the actual sender
$message=$message."<br/> Message sent by: ".$this->getSender()->getName()." ".$this->getSender()->getEmail();

In this case the sender is Mage::getStoreConfig(‘trans_email/ident_general/email’) is the site general contact mail which you can replace with any other config mail. I suppose the mail has the same domain as your site. Now the amazon server will let you mail to friends because the sender domain is your one!

For the novice: Mage_Sendfriend_Model_Sendfriend you can find in app/code/core/Mage/Sendfriend/Model

Posted in Errors, Uncategorized | Tagged , | 6 Comments

Magento causes internal server error 500

In magento 1.7 this can be caused by disabled track and trace in the htacces file

## TRACE and TRACK HTTP methods disabled to prevent XSS attacks

RewriteRule .* – [L,R=405]

Comment out the last two lines

## TRACE and TRACK HTTP methods disabled to prevent XSS attacks

#RewriteRule .* – [L,R=405]

Also in other cases you have to solve this by adding

php_flag apc.cache_by_default Off

Posted in Errors | Leave a comment

jNice with Multiple Select

jNice is a very useful jQuery plugin which helps you to create some nice forms from the html inputs. Unfortunately it is missing the customizing for the multiple select input, file input and textarea. I have modified the jNice script in order to enable the styling for the multiple select input. In the near future I will update to make it work for the input and textarea elements also.  The example page for the updated script can be found at and also you can download the example as If you have questions regarding jNice you can give a feedback here.

The original site of jNice is at

Posted in jQuery | Tagged , | 1 Comment

Block class override

If you happen to install  Creare Mass Landscape Shipping Label  and  Simple Order export  free modules  you will have the nasty surprise that in the orders actions menu  will not show up Print landscape shipping labels .  This is due to the fact that both override Mage_Adminhtml_Block_Sales_Order_Grid




The fast solution is to modify SLandsbek_SimpleOrderExport_Block_Sales_Order_Grid  and  in function _prepareMassaction()

add  after parent::_prepareMassaction();  the followings:

$this->getMassactionBlock()->addItem(‘mass_landscape_shipping_label’, array(
‘label’=> Mage::helper(‘sales’)->__(‘Print Landscape Shipping Labels’),
‘url’ => $this->getUrl(‘creareadmin/masslandscapeshippinglabel/massLandscapeShippingLabel’),



Posted in Errors, Uncategorized | Leave a comment

Exception message: Invalid method Mage_CatalogSearch_Model_Query::loadByQueryText

In magento 1.6  this caused by overriding with an older model local  in /app/code/local/Mage/CatalogSearch/Model

Posted in Errors | Leave a comment