Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Kids’ select shop with International brands
 
quanza
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2008-12-02
Tokyo, Japan
 

Hi all,

After one too many late nights, we’re proud to announce the launch of Abi Loves… - a children’s products store in English and Japanese.

http://www.abiloves.com

If you’re expecting kids, have kids, or need to get something for kids - you’re bound to find something (I hope!)

The site is image heavy and hosted in Japan, so your load-page times may vary if you’re accessing from overseas.  Please be patient - Japan locals get 100Mbps fiber (yes, 100Mbps :), so we’re less concerned with page loads here :P

Some notables:

- completely rewritten javascript for the onepage checkout process.  For us, jQuery offered enough benefits over the default Prototype / Scriptaculous to undertake the effort of ripping out the default opcheckout.js and recoding it in jQuery :) Also, the vertical accordian-style checkout didn’t make UI sense to us, so we redesigned it as a horizontal process.

- Yuu-Pack and EMS shipping modules for Japan

- “kana fields” support for Japanese names, where we store the phonetic spelling of Japanese users’ names alongside their kanji spelling.

- rewritten image zoom as a jQuery plugin.  I was surprised I couldn’t find a replica of the Prototype / Scriptaculous image zoom in jQuery.  The UI is what we wanted, but I’m trying to wean Magento off its dependence on Prototype, so a jQuery plugin was in order.

The modules for Japan (shipping and kana-support) will be packaged soon for public consumption.  The jQuery image zoom plugin will be provided on the jQuery plugins database once I catch up on paying my electricity bill, and the checkout jQuery code ... well, I wrote it abstractly enough that others should be able to use it, but I do need to clean it up a bit so will share it once I do that.

I’m curious if anyone knows if Magento has any jQuery “integration” plans on their roadmap?  In fact, best would be no *integration* of Javascript - leave that to do the developers.  Just don’t make it so hard to switch Javascript libraries!

Anyways, hope people enjoy the new shop!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vicky P
Sr. Member
 
Total Posts:  93
Joined:  2008-02-27
Devon, UK
 

Very nice looking site indeed!

Did you create some special blocks for the New and Specials sections on the home page?

 
Magento Community Magento Community
Magento Community
Magento Community
 
quanza
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2008-12-02
Tokyo, Japan
 

Thanks for the compliment, Vicky.  The Specials block is actually just a short-list of 5 sub-categories from a Specials category that we have.  The New block is only a little more complicated, requiring a method override and showing a special “new” designation based on the “New from” and “New until” dates for each product that can be set in the admin section.

 
Magento Community Magento Community
Magento Community
Magento Community
 
blakew
Sr. Member
 
Total Posts:  107
Joined:  2008-06-20
 

I am trying to implement Brands into our website, but have come to a fork in the road.

On way I can implement Brands is with a separate category structure and have static blocks for Brand landing pages. When using categories for Brands, I think I will lose the layered navigation, because I will be in the brand category not the product categories.

The other way is to use the manufacturer attribute, and just rename the label to Brand. The downside to using this is I would manually have to create a brand cms page for every one of our 2000+ brands.

Could you provide the method you used to get Brands working?

 
Magento Community Magento Community
Magento Community
Magento Community
 
quanza
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2008-12-02
Tokyo, Japan
 

Hi blakew,

we basically went with something similar to the first method you mention.  Brands are a separate category structure, with each brand a sub-category.  our layered navigation is not based on brands, so this wasn’t an issue for us.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Angela Miller
Jr. Member
 
Total Posts:  16
Joined:  2009-03-29
Coral Gables, FL
 

Nice site!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
JesperDK
Sr. Member
 
Avatar
Total Posts:  87
Joined:  2007-09-04
Denmark
 

Very nice site - and some nice products as well.

One minor detail would be having the option to view prices in different curencies. I don’t know that value of the japanese yen, so it might have scared me away if I didn’t bother looking it up.

But other than that it looks perfect. I love the colors, the boxes, the top menu and especially the checkout pages, looking like a piece of paper.

Many small details, which makes it all look great!

... I want one of those… wink

Jesper

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vicky P
Sr. Member
 
Total Posts:  93
Joined:  2008-02-27
Devon, UK
 

Is there any chance you could explain how you get the NEW! icon to appear against the new products on your catalog pages please?  There are several people asking how to do this, but no-one has given a solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
quanza
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2008-12-02
Tokyo, Japan
 

do you mean in the list of products?  I decided to override one of the classes to extend a new function call called “isNew”.  The class to override is Product.php, which you put here:

/local/Mage/Catalog/Model/Product.php

and add the following function (copied in full with my snide comments):

/**
     * check if status is "new" as set via admin
     *
     * @author: mromaine
     * @return bool
     */
    public function isNew()
    
{
        $new 
FALSE;
        
// retarded that we have to do this, but until Mage.app isInstalled() is fixed (~line 524),
        // we have to set our timezone explicitly for these date comparisons
        
date_default_timezone_set('Asia/Tokyo');
        
$cur_date = new DateTime($this->getResource()->formatDate(time()));
        
$from_date $this->_getData('news_from_date');
        
$to_date $this->_getData('news_to_date');

        
// sometimes news_from_date and news_to_date attributes aren't loaded ...
        
if($from_date == null || $to_date == null{
            $this
->load($this->getId());
            
$from_date $this->getResource()->getAttribute('news_from_date')->getFrontend()->getValue($this);
            
$to_date $this->getResource()->getAttribute('news_to_date')->getFrontend()->getValue($this);
        
}

        
if($from_date != null {
            $from_date 
= new DateTime($from_date);
            
$to_date = new DateTime($to_date);
            
$new = ($cur_date >= $from_date && $cur_date <= $to_date);
        
}

        
return $new;
    
}

then in your templates you can access the product->isNew() to find out if it is or not.

For example, in template/catalog/product/list.phtml I have this snippet:

<?php
        $_collectionSize 
$_productCollection->count();
        
$i 0;
        foreach (
$_productCollection as $_product):
            
$new $_product->isNew();
            
// this should not have to be done (i.e., we have to reload the product with our set storeId b/c Magento has a bug ...)
            
$_product Mage::getModel('catalog/product')->setStoreId($this->helper('core')->getStoreId())->load($_product->getId());
            if(
$i++ % == 0):
        
?>
            
<ol class="grid-row">
        
<?php endif; ?>
                
<li class="item <?= (($i % 4) == 0) ? "last" : '';?>">
                    <
a href="<?= $_product->getProductUrl() ?>" title="<?= $this->htmlEscape($_product->getName()) ?>" class="product-image">
                            <
img src="<?= $this->helper('catalog/image')->init($_product, 'small_image')->resize(158, 158); ?>" width="158" height="158" alt="<?= $this->htmlEscape($_product->getName()) ?>" />
                    </
a>

                    <
h5><a href="<?= $_product->getProductUrl() ?>" title="<?= $this->htmlEscape($_product->getName()) ?>"><?= ($new)?'<span class="new">NEW!</span> ':''?><?$this->htmlEscape($_product->getName());?></a></h5>

Some people may not know this, but if ... { A } else { B} syntax can be written as (...) ? A : B, which is what I’m doing in the ($new)?’<span… code to shorten it a bit.

Hope that helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Otavio
Member
 
Total Posts:  70
Joined:  2008-09-12
 

Wowww… Impressive site..

To be honest, I’d like this to be mine =]. Great work, quanza.

Been studying your site (really ;] ) and I have some questions, is there any possible way that you could help me?

1) The vertical menu - how did you do that? I’ve been playing around and didn’t found a way to do this (I’m quite new to Magento). And the categories that are shown actually subcategories, right?

2) When I get to a category, I see the subcategories listed above and under the products. Which block do you use to do that magic?

3) Brands - For each brand you must make subcategories with the products in it to show the little magic (subcategories listed under the products)?

4) The ‘About the Brand’ part - is it an attribute that you use?

I’m sorry for all these questions. The fact is that I really got amazed by your site. Hope you could help =]

Thanks,

Otávio Manfroi Chies

 
Magento Community Magento Community
Magento Community
Magento Community
 
quanza
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2008-12-02
Tokyo, Japan
 

hi Otavio.

1) The vertical menu - how did you do that? I’ve been playing around and didn’t found a way to do this (I’m quite new to Magento). And the categories that are shown actually subcategories, right?

The parent categories are basically hard-coded, and the child (sub) categories are what are dynamic.  so yes, the sub-categories are what you are seeing.

2) When I get to a category, I see the subcategories listed above and under the products. Which block do you use to do that magic?

actually, those are attributes.  I had to copy some code from the core and put it in the toolbar.phtml.  the code basically goes through all the products in the category, and figures out the total that have each attribute.  then you can filter by the attribute.

3) Brands - For each brand you must make subcategories with the products in it to show the little magic (subcategories listed under the products)?

correct.

4) The ‘About the Brand’ part - is it an attribute that you use?

i believe that text is taken from the category description.  each brand is a category, and there’s a description textarea in the admin for each category.

hope that helps some.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tiff
Sr. Member
 
Avatar
Total Posts:  107
Joined:  2008-03-25
Upstate NY
 

I love it!  And I think my very favorite element is the horizontal list of subcategories above the products when I go into a category.  Great job!  And thanks for the above code… I may end up doing the “new” thing too!

 
Magento Community Magento Community
Magento Community
Magento Community
 
flakdesign
Jr. Member
 
Total Posts:  1
Joined:  2008-08-07
 

Great site quanza,

1 thing i would like to point out is that, I get very confused on which page i am on.  Maybe you can

1. Add breadcrumbs
2. Use slightly different colors for cart listing.
3. A white body background looks amazing on your site. Try it out.

With usability in view, white background captures users focus and makes your site standout . smile

regards
vinay

 
Magento Community Magento Community
Magento Community
Magento Community
 
jvanoel
Jr. Member
 
Total Posts:  28
Joined:  2009-04-20
Rotterdam
 

This is a amazing site! And it will be a good example for me to learn and build own Magento themes.

2) When I get to a category, I see the subcategories listed above and under the products. Which block do you use to do that magic?

actually, those are attributes.  I had to copy some code from the core and put it in the toolbar.phtml.  the code basically goes through all the products in the category, and figures out the total that have each attribute.  then you can filter by the attribute.

I’ve have a question about the qoute above, can you paste the code that you’ve added to the toolbar.phtml to get those attributes above the listing? And is that the only thing you did to add the attributes there?

Thanks, and again.. amazing!

EDIT
I’ve got another question, how do you get those images before the categories on the left navigation?
And i see you have an “active/selected” class on the topmenu items. Magento itself doesn’t have it right? How did you do that?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Remulon
Jr. Member
 
Total Posts:  15
Joined:  2009-04-16
 

Hi quanza,

Nice site, very original.

Can you tell me how you display the manufacturer names in the product listing?

I plan to show the manufacturer name everywhere with the product name.

I thought I may be able to modify the getName() function in /local/Mage/Catalog/Model/Product.php so I could get the manufacturer name and concatenate it to the front of the product name, but I have had little success.

Basically I replaced:

public function getName()
    
{
        
return $this->_getData('name');
    
}

with:

public function getName()
    
{
        $manufacturer_name 
$this->_getData('manufacturer');
        
// sometimes manufacturer attribute isn't loaded ...
        
if($manufacturer_name == null{
            $this
->load($this->getId());
            
$manufacturer_name $this->getResource()->getAttribute('manufacturer')->getFrontend()->getValue($this);
        
}
        $product_name 
$this->_getData('name');
        return 
$manufacturer_name ' - ' $product_name;
    
}

In the compare products sidebar box it works, and in the recently viewed products sidebar box it works too, but nowhere else.

In the other places it returns a 1.

How have you implemented it in your product listing?

R.

 
Magento Community Magento Community
Magento Community
Magento Community
 
leevo
Jr. Member
 
Total Posts:  22
Joined:  2009-03-21
 

@ Remulon,

I tried your solution and I got the same output as you had.

I figured out that the difference between the viewed/compared and the rest of the site is within the class function.

getRecentProductsCollection gets all the attributes, not as ID but as name. (as in reports/model/block/abstract.php)

_getProductionCollection gets all the attributes as ID, so the ID is shown on the frontend.( as in list.php)

Unfortunally I’m not very good with PHP or with wrighting stuff.

So hopefully this will help you figure out how to complete you task.

Maybe you could help me with something. I only want the manufacturer, type and category on the viewed and compare blocks.
Do you have a solution?

gr.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2