Posted in : Techno Babble
I've been a smidge quiet lately because we're in the middle of re-skinning an old OS-Commerce store. As always we started by creating a shiny new dev sub-domain for it to live on so we don't break the live site ..... problem number 1, OS-Commerce requires register globals to be enabled before it can run .... wtf? Not a chance that's going to happen on our server, not even a dev site! .... so, joy of joys we now need to find another e-commerce solution as well as skin it!
After wandering around the demo areas for a few other e-commerce solutions and listening to suggestions from other people we eventually ended up picking Magento Commerce ..... cool, decision made, time to go to work.
So, I got handed this shiny new software and a picture of the proposed skin with "let me know when you've sorted all the code out" ... and into the deep end I dived ....... I wish like hell I hadn't ... I have NEVER seen so many files required for a skin in all my life!! ..... seriously, I didn't even bother to count them, mainly because I have trouble with 3 digit numbers, but also because I get bored easily .... but, how hard could it be right? ....... wrong! As well as having more files than a blonde can count before either the boredom threshold or upper number cap is hit, they also have this reaaaaaally "flexible" approach to skinning where everything is controlled by XML files, and some other files.
This one controls the catalogue, note, this is just for viewing the catalogue, there's another for customers, and one for checkout .... ohhh and another for sales, and one for searching the catalogue ...... etc
XML:
<?xml version="1.0"?> | |
<!−− | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php | |
* If you did not receive a copy of the license and are unable to | |
* obtain it through the world-wide-web, please send an email | |
* to license@magentocommerce.com so we can send you a copy immediately. | |
* | |
* @category design_default | |
* @package Mage | |
* @copyright Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com) | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
*/ | |
| |
Supported layout update handles (action): | |
- catalog_product_gallery | |
- catalog_product_compare_index | |
| |
Supported layout update handles (special): | |
- default | |
- catalog_category_default | |
- catalog_category_layered | |
- catalog_product_view | |
| |
−−> | |
<layout version="0.1.0"> | |
| |
<!−− | |
Default layout, loads most of the pages | |
−−> | |
| |
<default> | |
| |
<!−− Mage_Catalog −−> | |
<reference name="top.menu"> | |
<block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/> | |
</reference> | |
<reference name="right"> | |
<block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml"> | |
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action> | |
<action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800) DEMO-NUMBER.</alt></action> | |
<action method="setLinkUrl"><url>checkout/cart</url></action> | |
</block> | |
</reference> | |
<reference name="right"> | |
<block type="core/template" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/> | |
<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml"/> | |
</reference> | |
<reference name="footer_links"> | |
<action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title><prepare>true</prepare></action> | |
</reference> | |
| |
</default> | |
| |
| |
<!−− | |
Category default layout | |
−−> | |
| |
<catalog_category_default> | |
<reference name="left"> | |
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml"> | |
<block type="catalog/product_list" name="product_list"></block> | |
</block> | |
</reference> | |
</catalog_category_default> | |
| |
<!−− | |
Category layered navigation layout | |
−−> | |
| |
<catalog_category_layered> | |
<reference name="left"> | |
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml"> | |
<block type="catalog/product_list" name="product_list"></block> | |
</block> | |
</reference> | |
</catalog_category_layered> | |
| |
<!−− | |
Compare products page | |
−−> | |
| |
<catalog_product_compare_index> | |
<!−− Mage_Catalog −−> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/one-column.phtml</template></action> | |
</reference> | |
<reference name="head"> | |
<action method="addJs"><script>scriptaculous/scriptaculous.js</script></action> | |
<action method="addJs"><script>varien/product.js</script></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/product_compare_list" name="catalog.compare.list" template="catalog/product/compare/list.phtml"/> | |
</reference> | |
</catalog_product_compare_index> | |
| |
<customer_account_index> | |
| |
<reference name="right"> | |
<action method="unsetChild"><name>catalog_compare_sidebar</name></action> | |
</reference> | |
</customer_account_index> | |
| |
<!−− | |
Product view | |
−−> | |
| |
<catalog_product_view> | |
<!−− Mage_Catalog −−> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/2columns-right.phtml</template></action> | |
</reference> | |
<reference name="head"> | |
<action method="addJs"><script>varien/product.js</script></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml"> | |
<block type="catalog/product_view_super_config" name="product.info.config" as="super_config" template="catalog/product/view/super/config.phtml"/> | |
<block type="catalog/product_view_super_group" name="product.info.group" as="super_group" template="catalog/product/view/super/group.phtml"/> | |
<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml"/> | |
<block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data" /> | |
</block> | |
</reference> | |
<reference name="right"> | |
<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/> | |
</reference> | |
| |
</catalog_product_view> | |
<!−− | |
Product send to friend | |
−−> | |
<catalog_product_send> | |
<!−− Mage_Catalog −−> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/2columns-right.phtml</template></action> | |
</reference> | |
<reference name="head"> | |
<action method="addJs"><script>varien/product.js</script></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/product_send" name="product.send" template="catalog/product/send.phtml"> | |
</block> | |
</reference> | |
</catalog_product_send> | |
| |
<!−− | |
Product additional images gallery popup | |
−−> | |
| |
<catalog_product_gallery> | |
<!−− Mage_Catalog −−> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/one-column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/product_gallery" name="catalog_product_gallery" template="catalog/product/gallery.phtml"/> | |
</reference> | |
</catalog_product_gallery> | |
| |
<!−− | |
Site Map block | |
−−> | |
<catalog_seo_sitemap_category> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/1column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/seo_sitemap_container" name="seo.container" template="catalog/seo/sitemap/container.phtml"/> | |
</reference> | |
</catalog_seo_sitemap_category> | |
<catalog_seo_sitemap_product> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/1column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/seo_sitemap_container" name="seo.container" template="catalog/seo/sitemap/container.phtml"/> | |
</reference> | |
</catalog_seo_sitemap_product> | |
<!−− | |
Catalog search terms block | |
−−> | |
<catalog_seo_searchterm_popular> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/1column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/seo_searchterm" name="seo.searchterm" template="catalog/seo/searchterm.phtml"/> | |
</reference> | |
</catalog_seo_searchterm_popular> | |
| |
</layout> |
Ok, I know I'm blonde and it doesn't take a lot to confuse my poor cell, but bloody hell I normally at least have a chance of grasping stuff within a reasonable time frame ........ seven hours later my wall is starting to take on the shape of my forehead but at least I finally managed to move the sidebar from the right side to the left side .... I'm a genius
....... faaaaaaaaaantastic, now all I need to be able to do is move every component to the location of my choice and code up all the extra modules that we require for the proposed template .... suddenly Everest looks like a small rock.
Several days later and I'm a smidge more au fait, or whatever that flash french saying is for "got slightly to grips with", with their templating system, and I've managed to satisfy myself that I can at least achieve our requirements within my lifetime, and I've begun making all the changes that we need.
It didn't take me long to get bored with all the files and folders required for a bloody skin, so instead of altering their files I decided to make a single folder for all my changed files to live in. Compared to their god knows how many, I'm currently floating around the half-dozen mark, mind you, there's a long way to go yet but I should hopefully keep the total to way less than half of theirs, and the framework of the skin is finally coming together ..... which will cheer Dexter up, as he's raring to go with the new shop as soon as possible ![]()
Did I mention I think the skinning system is over complicated? Seriously over complicated. I really hope that the developers of the software do a 100% rethink about their skinning system. Not only is it FAR to complicated for the average joe to contemplate playing with, it *appears* to put a fair load on a server whilst it decodes all the files, there's several posts on their forums about it, I can't really tell as I'm playing with very little test data, but that'll change soon as we start adding more products for a dry run.
Despite all of the above I actually would, as long as you don't have a huge store and either have a masochistic outlook on life or you have enough money to pay somebody to skin it for you. The main things that impressed me about the software was that the default template has an XHTML Strict doc type and the admin area was better than all the others that I'd seen by a long way. Remeber that it's still in beta though, and not really recommended for a live site ![]()
Note : If you're even remotely considering asking us to do a Magento skin for you then our prices start at £2,000 .... or £20 a file, whichever is greater ![]()
¥
Trackback URL (right click and copy shortcut/link location)
Trackback url for this post
Note : This trackback url is time limited so use it within 30 minutes or the SpamHound will snarl at you.
http://waffleson.co.uk/z/?k=369921726331032385615cdbce9f75fab5b10ca410f005c8a
Posts : 323
Joined : 04/04/05
Reply to comment 14590 by Gary