Magento custom designed gallery

12 Comments 31st OCT 2009 | Posted by Vedran Subotic in Magento

Magento custom designed gallery

Magento custom designed gallery plugin contains two modules.
You can guess, one is for displaying images on frontend and second one is for handling images and categories in backend.

I will not write too much about this modules because there are too much files and it will take too much time to describe.
Most of things used in this modules are already described by my working colleagues.

Backend module is based on interface for adding images of products in magento shop.
When you integrate it into your shop it will install two additional custom tables in database which will store data of your gallery (categories and images)

backend_category

Images on frontend handles Inchoo_GallFront module.
To see changes on frontend enter link http://www.your-web-shop.com/index.php/inchoogallery/, this is handled in config file of Inchoo_GallFront at:

   <frontend>
        <routers>
            <inchoogallery>
                <use>standard</use>
                <args>
                    <module>Inchoo_GallFront</module>
                    <frontname>inchoogallery</frontname>
                </args>
            </inchoogallery>
        </routers>
    </frontend>

In Inchoo_GallFront_IndexController find indexAction(), and you will see that there is custom template file ‘gallery/demo.phtml’
(rememer that this is based on default frontend theme so do not forget to copy this files/folder if you use another theme).

frontend

All you need to do is rearange categories and images on frontend.
In ‘gallery/demo.phtml’ file you have two arrays which you have to modify and display pictures from categories as you wish.

Here is set of files you can download and install: Magento custom designed gallery
Enjoy coding.

If you like what you read, please share it.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Yahoo! Bookmarks
  • Reddit
  • Technorati
  • Twitter
  • StumbleUpon
  • LinkedIn
  • Netvibes
  • NewsVine
  • Sphinn
  • Tumblr
  • Posterous

To post code in comments, place your code inside [code] and [/code] tags.

There are 12 comments (Add Yours +)

  • I want put this gallery into my home page (not in inchogallery). Ho I can do it? Thanks!

  • @Oleksii
    Here is working example of overriding controllers, Models and Blocks which developed my working colleague Branko Ajzele.
    You should study this module and you will be able to override anything you want and put the gallery wherever you want;
    link: http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/

  • Transform call through template to call through Block would be good! But I don’t know how it it to do… I studies that, but litle example may help me

  • Amazing plug-in, you saved my life!
    Thanks for this Christmas gift… ;)

  • @Matte
    No Matte, thank you for your reply.
    Hope that you have more lives than a cat
    :D

  • Hello Vedran. Can you help. I want to display not all images on the page. I t should be images for one category which I will choose by clicking. How can I get id from $image and from category and check for corecpond. I think should be like that, but need your opinion $category->Mage::getModel(‘cpa/img’)->getCollection()->addFieldToFilter(‘category_id’, array(‘in’=>array($id)));
    you can look what I want in my site http://www.bluebirdcard.com/index.php/inchoogallery

  • Hi Thanks For this Extension

    i want to Little Bit customize it i want one extra field for Image Link in which when we click it redirect to that product

    i also want to manage this link from admin side same as image label in it

    So please Help me

    Thanks

  • Hi Inchoo team, thanks for the code, as usual really helpful.
    I’m sorry to say I’m having some problems :-/. I can’t seem to save images. I can browse and upload them, assign a label but when I click Save button it exits to category page and returns an error “Category allready exists”. I also tried to remove the demo image, and it doesn’t seem to work.
    I tried to debug it , $this->getRequest()->getPost() contains name of existing category and demo image but no info on new images.
    Creating category works fine.
    I have Magento v. 1.3.2.4.
    I’ll be grateufl for any kind of suggestions… Thanks!

  • I managed to solve it. This custom module creates 2 tables in DB and then uses SQL sentences to retrieve data. I set my Magento store to add a prefix “mage_” in front of every table. So in file \app\code\local\Inchoo\Cpa\controllers\CatController.php there are these sql sentences and in front of every DB table name I put “mage_”.
    So “inchoo_cat_images” now becomes “mage_inchoo_cat_images”.
    “CatController.php” is the only file where you should add prefix.

  • Just tried all this.

    Think I’m missing something here, as all it returns is the two arrays.

    Anyone got an example of how they are displaying their images and not just the array text.. yeah i know, im a dunce.

  • Great extension. Thank you :)

  • Hi Inchoo team,

    I have a problem regarding this gallery module, every this working fine, but when i assign only this role to particular user then this will not listed in that user admin panel.
    Please resolve this issue, i am very thankful to u.

Leave a Comment

Please wrap all source codes with [code][/code] tags.
Magento Design and Development | Magento SEO | iPhone Application Development Web Application Development with ZEND | WordPress Ecommerce | WordPress development
Sitemap

Inchoo - webappsolutions | 2009