Archive

Archive for the ‘Magento’ Category

mod-pagespeed and Collapse Whitespace

May 16th, 2013 No comments

Today I have removed “collapse_whitespace” from “ModPagespeedEnableFilters” because I have found that this setting breaks the top navigation view of Magento using Shopper theme.

With “collapse_whitespace” enabled for example

Home > Eyeglasses > Woman’s Eyeglasses

is shown as

Home Eyeglasses Woman’s Eyeglasses

The “>” is missed – but I have no idea why… strange…

Categories: Magento Tags:

The success of the Virtual Eyeglasses Try On Software…

April 14th, 2013 No comments

…written using Adobe Action Script 3 is amazing… I’m almost confused a little because of this.

We have a lot of installations around the whole world now. The software was translated to English, French, Italian, Spanish, Russian, Hebrew – and of course there is still a German version.

And we have extensions and code snipplets to embed this VTO into Magento, HikaShop, Shopify, OpenCart, Drupal, Joomla and sCat.

Even I’m about the html5 version since months I’m not very satisfied with the result, using Dart. That’s really confusing ;-)

Magento, Shopper theme and VTO

March 5th, 2013 No comments

Last week I have updated bennewitz.com and I was able to fix a long time bug of Magento.  The problem appears when I change the language from German to English. The names of the catergories are different – that’s why I receive an 404 error. There was no translation of the category name, based by the category ID.

This is a very nasty error.

Looking into the code I found that I had removed the “?___from_store=xx”output in past for better SEO: Inside of /app/design/frontend/base/default/template/page/switch/languages.phtml “getCurrentUrl()” was set to “getCurrentUrl(false)”.

This was a bad idea because this avoids the translation of the category name. However setting this back to default the language switcher doesn’t work as expected. Even the category name is translated the store code is still missed.

In result I had to look some deeper inside the php… for Magento 1.7.0.2 I have found this fix:

/app/code/core/Mage/Core/Model/Url/Rewrite.php

Starting from line 251 I have replaced the default assignment to $targetUrl

Mage::app()->getCookie()->set(Mage_Core_Model_Store::COOKIE_NAME, $currentStore->getCode(), true);

// endur 02-03-2013 fix for missed store code
// $targetUrl = $request->getBaseUrl(). '/' . $this->getRequestPath();

if (Mage::getStoreConfig('web/url/use_store') && $storeCode
    = Mage::app()->getStore()>getCode()) { 
    $targetUrl = $request->getBaseUrl(). '/'
     . $storeCode . '/' .$this->getRequestPath();
    } else {
      $targetUrl = $request->getBaseUrl(). '/' . $this->getRequestPath();
    }

// endur 02-03-2013 end

 

to get the store code added. It seem’s a bug of Magento 1.7.0.2.
Of course I havn’t change the core file itself, I have changed a copy instead:

/app/code/local/Mage/Core/Model/Url/Rewrite.php

…and the language switcher is working well from now ;-)

 

Categories: Magento Tags:

Shopify and virtual try on software for eyeglasses

February 8th, 2013 No comments

Since last week I was able to find a way to embed VirtualMirror into Shopify. I have “learned” Liquid for this… While the backend of VirtualMirror has to be run on an external server VirtualMirror itself can be called from cdn.shopify.com including the images to load.

However, I’ll prefer the “hard” way: A root server, running Linux + Magento.

Porting Virtual Mirror for Eyeglasses to HTML5…

December 9th, 2012 2 comments

…will be the next step. The development of the available AS3 version is continued.

Using HTML5 Virtual Mirror will have a reduced functionality compared against the AS3 version but at present this is an alternative way  for tablet computers on client-side.

A new version of Virtual Eyeglasses Try On software…

December 2nd, 2012 13 comments

…was released as version 0.6.6 on Sunday, December 02, 2012.
The version is here.

The total width of the frame in millimeters can be passed as an additional parameter. Check out the different frame size (Medium Sized, Large Metal, and Kids Glasses).

Friday, December 07, 2012: The Bugfix Day
Apart from some small enhancements of the user interface two other longtime bugs are fixed:

  1.  If the webcam was closed the default frame is loaded instead of the last visited one.
  2.  If the web cam was enabled / disabled multiple times without a reload of Virtual Mirror the detection of  face and pupils doesn’t work and the spinner is shown for ever.

The link on top was updated today,  it may needed that you have to clean up your browser cache if you had gone to this page before.

The Virtual Mirror for Eyeglasses (VTO) in Italian…

November 13th, 2012 No comments

…was updated to version 0.6.5 in November 29, 2012.
Translation was done by Fabio Carli for the license of Ideolo.

Magento Wishlist Issue

November 8th, 2012 No comments

Yesterday I have enabled the whishlist of Magento 1.7.0.2 Community and I got a small problem.

The “Move to Wishlist” function inside of the shopping cart has a wrong confirmation message:

“Item xxx has been moved to wishlist Wishlist.”

The reason may be that Magento Enterprise Edition can handle multiple wishlists but the Community Edition not. The fix was a changed translation from

“%s has been moved to wishlist %s”,”%s has been moved to wishlist %s” to
“%s has been moved to wishlist %s”,”%s has been moved to Wishlist.”

I have simply added the last line to my locale/en_US/translate.csv file (theme) to get rid of this useless duplication.

Categories: Magento Tags:

Magento, merge Javascript and mod-pagespeed

November 6th, 2012 No comments

Within the last days I got an ugly Javascript error (missing ‘;’ at line 25619), only using MSIE 8 for Magento’s detailed product view… Thinking about the latest changes done I was able to find the reason:  It was a combination of the enabled Javascript merge function of Magento together with Google’s mod-pagespeed extension for Apache.

The line number 25619 of the merged Javascript file was in reality line number 564 of js/varien/product.js…

There we have this:

this.skipCalculate = config.skipCalculate;//@deprecated after 1.5.1.0

The comment on this line is problematic for MSIE and the setting, described on top, I think especially the ‘@’ was the reason for the error.

I have removed the comment completely:

this.skipCalculate = config.skipCalculate;

The error is gone now even with Magento’s Javascript merging enabled. ;-)

Categories: Magento Tags:

Joomla, Hikashop and the VTO

October 27th, 2012 No comments

Over this dark day – we got our first big snow here – I have written some code to embed Virtual Mirror into Hikashop, an extension for Joomla. While I have written our own e-commerce system in past using Perl and while I’m very familiar with Magento since the last year this was a new experience.

The best documentation of Hikashop is the php code of Hikashop ;-)