Magento custom designed gallery

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.

21
Top

Enjoyed this post?

Subscribe to our RSS Feed, Follow us on Twitter and spread it to your friends!

Author

Vedran Subotic

Ex. Inchooer

Vedran worked in Inchoo from 2009 to 2012 as a Senior backend developer and as a team leader.

Other posts from this author

Discussion 21 Comments

Add Comment
  1. Oleksii

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

  2. @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/

  3. Oleksii

    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

  4. Matte

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

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

  6. 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

  7. Kamal

    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

  8. K

    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!

  9. K

    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.

  10. Nick

    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.

  11. Diana

    Great extension. Thank you :)

  12. 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.

  13. liza

    Hi Vedran,

    I’m new to magento so please be bear with me, I’ve uploaded the files to my server. but i don’t know what should i do next, is there any customization i should do on these files, aslo i didn’t find the 2 tables at datasbe and when i try to open the inchoo gallery from admin i got this message

    There has been an error processing your request

    Exception printing is disabled by default for security reasons.”

    please calrifay to me more about it.
    I like the inchoo products, i’ve used the featured products at my site and i’d like to use the gallery also.

    Thanks

  14. Mahendra

    Hi Thanks for share such a good article …………..

    i have used this but in admin area its not showing the image upload and save option, only show the no image but there are one entry into DB..
    will you help to me for resolve this problem….

    Thanks a lot………….in advanced………..

  15. Kristina

    Hi there, I know it’s been awhile since someone posted, but I must be missing something – I’ve put the files in but Inchoo Gallery is not showing my admin? I’m running Magento 1.4.2.0. Any thoughts? Is there something I need to do besides uploading the files via FTP?

  16. Thanks for posting this solution. The modules are working as expected. I’m looking forward to getting under the hood and seeing how things work.

  17. Leigh

    I have the same issue as Kristina. It is a great module, but disappointing that the developer cannot provide an answer to this issue.

  18. Hello Friends, Can some one post some kind of example to be able to call the gallery somewhere in the magento. Thank you, because I did not understand how to do it.

  19. Francoisd

    Hello,

    I just installed successfully the extension and on frontend I exactly have the same window than you with the 2 array.
    But what we have to modify to show the gallery and not the code ??
    Can you put an example with one picture please ?
    Thanks

  20. @Francoisd

    edit ‘gallery/demo.phtml’ and add img tags :)

  21. Francoisd

    Excuse me but I don’t understand. I have this code in the demo file. Which tag do I have to write and where ? (I’m not friend with Php :( )

    $categories = Mage::getResourceModel(‘cpa/cat_collection’);
    $cat_data = $categories->getData();

    $images = Mage::registry(‘cpa_img’);
    $img_data = $images->getData();

Add Your Comment

Please wrap all source codes with [code][/code] tags.
Top