1

I'm stuck here. I'm trying to create code that will list out all of the available sizes for the item without using a drop down. In the two links below you will see what I am talking about. Any items that are out of stock are grayed out and when you click on an item in stock the item availability comes up in red below your selection.

Can anyone point me in the right direction (maybe a tutorial) in how to get this done? I'm trying to implement it in my magento site. Would I need to use php or is there an option in magento?

Shoe Examples: http://www.karmaloop.com/product/The-AR-20-Sneaker-in-Craft-Blue-Running-White/263936

Shirt Examples: http://www.karmaloop.com/product/The-We-Win-Hoody-in-Black/271919

j08691
  • 204,283
  • 31
  • 260
  • 272
  • 1
    This is a big request. Have you done any research? Do you have anything started? I don't know much about Magento, but it's certainly do-able. You need to locate the respective item in the database, pull out it's available sizes and quantities of those sizes and loop that data into a group of radio buttons. So, the solution is a mixture of PHP, SQL queries, JS and CSS to get the exact effect of that karmaloop site. A book like this might help http://www.sitepoint.com/books/phpmysql5/ – boggsey Oct 05 '12 at 17:44
  • RADIO CSS HACK! that is about as far as i'm willing to go. you can see it here http://codepen.io/rlemon/pen/KyDgh for the color options. The server site stuff is all you – rlemon Oct 05 '12 at 20:42
  • First off, greatly appreciate your response! I've spent hours trying to research the web for this answer and I guess I just didn't know how to correctly describe what I was looking for in just a few words. Thank you for helping me understand the process and point me in the right direction. – CabralMedia Oct 08 '12 at 19:51

2 Answers2

0

To do what you want, first you would have to create configureable products (for all the size/option per product) to keep track of which option is out of stock.

The easiest way I can think of is to create a custom module and modify /app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php to make Unordered HTML list then use css to style. (you could use javascript to do this but you may run into this issue How do you stop Chrome and Opera sorting JSON objects by Index ASC?)

Then take a look at getJsonConfig() in app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php this will produce a json object that is available on the product page and should which product is in stock. Then you can use javascript/css to highlight which is in stock.

This is a example of one site that i work on http://www.contempospace.com/bedroom-furniture/wardrobe-closets/custom-closet-systems/isa-custom-closet-4-module/isa-closet-system-xl-maximize-large-closet-drawers-shelves-hanging.html with that functionality. But as the previous person mention this is a big request. I would reccommend to find a pay/free module and then make any changes you need.

Community
  • 1
  • 1
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62
  • Thank you for your detailed response! That helps me out plenty in figuring out how to go about attacking the problem. Would you be interested in exchanging contact information so that I can ask you more questions? I can provide compensation of course. – CabralMedia Oct 08 '12 at 19:58
  • Send me a email rs.nyc101 at gmail dot com – MagePal Extensions Oct 08 '12 at 20:41
  • Message sent. Just in case it's lost in your junk mail the subject line begins with "Stack Overflow..." – CabralMedia Oct 10 '12 at 14:58
0

Configurable Products in Magento This will help !!