Magento Themes and Magento Extensions

Attribut-Werte vor der Ausgabe im Frontend verandern

Share
Posted on October 31st, 2014 | Posted by admin

Für alle, die sich schon immer gefragt haben, wofür eigentlich der Catalog-Output-Helper ist, möchte ich in diesem Beitrag einmal ein wenig Licht ins Dunkel bringen. Um genau zu sein, geht es um folgende Zeilen

$_helper = $this->helper('catalog/output');
echo $_helper->productAttribute($_product, $_product->getDeliveryTime() , 'delivery_time');
// oder
echo $_helper->categoryAttribute($_category, $_category->getName(), 'name');

Warum sollte man also die Ausgabe eines Produktattributes noch einmal durch einen Helper schieben müssen? Man will doch einfach nur einen bestimmten Wert haben und sonst nichts, oder?

Der Grund ist ganz einfach: Durch verschiedene Handler ist es möglich, die Ausgabe eines jeden Attributes zu manipulieren. Die entsprechenden Handler müssen einfach nur im Output-Helper registriert werden, und schon kann man durchstarten.

Zum Start schauen wir uns einmal das Event catalog_helper_output_construct an. Dieses wird aufgerufen, wenn der Output-Helper instanziiert wird. Wir wir wissen, handelt es sich bei einem Helper immer um ein Singleton – so wird das Event also auch nur ein einziges Mal geworfen.

Working with date functions in Magento

Share
Posted on October 13th, 2014 | Posted by admin

The date time will be calculated based on the lacale timezone settings in administration:

$anyDate = ’2012-11-21 13:00:00′;
$dateTimestamp = Mage::getModel(‘core/date’)->timestamp(strtotime($anyDate));
echo $currentDate = date(‘Y-m-d H:i:s’, $dateTimestamp);

Other PHP scripts to find the offset for the timezone

/** Script to calculate the offset seconds fro the timezone */
$timezone = new DateTimeZone(“Europe/London”);
$offset = $timezone->getOffset(new DateTime(“now”)); // Offset in seconds

MAGENTO OPENS ITS DOORS TO THE COMMUNITY

Share
Posted on October 2nd, 2014 | Posted by admin

After many months of hard work by many people, the Magento team, the members of the Community Advisory Board, as well as many members of the community, are very proud to announce the general public availability of the Magento Contributor Agreement to the community.

One of the goals they have been working towards is now a reality–the ability to accept code and other forms of contributions from community members around the globe!

How to display NEW products on the HOME PAGE

Share
Posted on September 24th, 2014 | Posted by admin

First you will need to set some products as new. To do that you will need to edit some products and mark them as new, from the “General” product information page, by setting up the ”Set Product as New from Date” and “Set Product as New to Date”.

After you’ve set up a few products as new you, now, can display them on the home page by going to “CMS – Manage Pages” and select “Home Page” from the list of pages and add this code on the CMS page:

{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}

SNS Lunar – Premium Responsive Magento Theme

Share
Posted on September 23rd, 2014 | Posted by admin

SNS Lunar is a Premium Responsive Magento Theme. If you want to have a very unique and attractive design and trying to make your way among numerous store owners, >SNS Lunar is a great starting point for you.

SNS Lunar with powerful features, easy to customize, power admin, cool effect. We hope you will have a great experience

Page 1 of 15512345»102030...Last »