Thursday, October 31, 2013

Easylife Switcher extension

I've just released a new Magento extension called 'Easylife_Switcher'.
This is what it does:
  • Frontend:
    • it can change the configurable products dropdowns to text or image labels
      config
    • it allows you do display the out od stock combinations of configurable products with a "not available" overlay (see image above - medium size). The out of stock products may be selectable or not. Your choice.
    • it can change the main image in the product page when a combination is selected, if an image is available for the simple product. You can set the attributes that change the image.
    • it can change the full media block in the product page when a combination is selected, if at least the main image is available for the simple product. You can set the attributes that change the media section.
  • Backend:
    • it allows you to set a default configuration to be selected while accessing the configurable product page.
      backend
Code and more details on how to use can be found here: https://github.com/tzyganu/Switcher

14 comments:

  1. Hello Marius,
    this extension looks cool but how to install it?
    Just uploading files?

    Thanks

    ReplyDelete
    Replies
    1. You can download an archive with the code from github and copy the files of the extension over your magento instance. Make sure that the app folder goes over the app folder of magento. js over js and skin over skin. Nothing should be overwritten.

      Delete
    2. wow, works wonderfully.

      any chance to have switchers unselected when entering a product page?
      or why not keeping the first select element ( "choose ... ") as a switcher-label and position it absolutely outside of the page so we can basically workaround the auto selection and have nothing visible selected?

      have a nice day

      Delete
    3. I don't have a reason for that. It seamed more appropriate to do it like that. Feel free to change the extension as you want and even publish your changes. If you want you can even make a pull request on github with your modifications and I will merge them in the extension after testing.

      Delete
  2. easylife switcher colour switcher using image and more image change not change

    ReplyDelete
  3. Hi Marius, great work. I have one question: Is it possible to make your module work with cloud zoom? Currently cloud zoom is not triggered/working on dom ready but only after selecting a "image changing" attribute, e.g. color, in other words it only works after reloading the media block. I tried reinitializing cloudzoom in your module's callback function with CloudZoom.quickStart(); in the backend config but it did not work.

    ReplyDelete
  4. In addition to my previous comment, I resolved the issue modifiying the configureForValues function in product.js, setting both variables to true. Hope this helps someone!

    ReplyDelete
  5. Hi Marius, thanks for the awesome extension. Just a quick question, I cant seem to set the default simple product in admin, each time I save it disregards it and no default is saved.. I saw that I did have default_configuration_id so I uninstalled and ran the sql queries, then re-installed and renamed the value in data.php but the problem persists.. any ideas?

    ReplyDelete
    Replies
    1. Hello Julia. I can confirm that this is a bug. It seams that you cannot save the default configuration when CREATING a configurable product. But you can save it when UPDATING one. I will fix this a soon as possible. Until then you can just save the product then edit it again and set the default configuration.

      Delete
  6. Hi Marius,
    That was really nicely explained short and straight-forward... looking forward to get more hints from your blog

    ReplyDelete
  7. Hi Marius, I have installed this extension but am wondering if it is possible add the function to the page such as when people select the color Red, on the selection title where it would say "Color * " would now say "Color: Red" . This is like what Amazon does on their configurable products. Same to other such as "size" and "style", etc.

    Also on the side note, not sure if it is this extension or others, I keep getting the warning "Blocks HTML output" is invalidated, refreshing it only last minutes until another warning come up. Just a note.

    ReplyDelete
    Replies
    1. Your request is kind of specific. I don't think it will add a big value to the extension itself. Sorry but I will not implement it. But you can try to do it yourself. Check the `js/easylife_switcher/product.js` file. Inside it there should be a method called `selectValue`. That one is called when selecting an option from the configurable attributes. You need to inject you js that would add something to the label.

      As for the blocks output, I don't think the extension is responsible for this. But there is one way to find out. Disable the extension and see if the problem reproduces.

      Marius.

      Delete
  8. Aha! This is what I've been looking for ... but for one thing. It would be perfect if when an out of stock item was selected, the "In Stock" label changed to "Out of Stock" and the "Notify me when back in stock" link appeared for the out of stock product. Thanks for your great work, all the same..

    ReplyDelete
    Replies
    1. Hey Chris. I'm glad you enjoy the extension and it is useful for you. About the stock notification....I had this discussion with someone before and the conclusion was that I will not implement it. :) . Here are the reasons why. Main reason is that usually when dealing with configurable products, the simple products are not visible. And if you subscribe to a stock alert, when the product comes back in stock you get an e-mail with a link to the product page. But if that product is not visible you get a 404 page. I don't want to rewrite the stock alerts behavior. And even if I did, and checked if the simple product that comes back in stock is a part of a configurable product I still wouldn't know where to point because in theory a simple product can be a child of more than one configurable product. Too much work for a small added value. Sorry for disappointing you but I won't add this feature to the extension. but feel free to fork the extension, add this feature and redistribute it as your own.
      Cheers,
      Marius.

      Delete